OSDN Git Service

am 024b7b9d: am a0739ea3: am af242824: Revert "Fix a type error in the allocation...
[android-x86/dalvik.git] / vm / native / dalvik_system_VMRuntime.c
index da529e4..3642f90 100644 (file)
@@ -55,23 +55,6 @@ static void Dalvik_dalvik_system_VMRuntime_nativeSetTargetHeapUtilization(
 }
 
 /*
- * public native void runFinalizationSync()
- *
- * Does not return until any pending finalizers have been called.
- * This may or may not happen in the context of the calling thread.
- * No exceptions will escape.
- *
- * Used by zygote, which doesn't have a HeapWorker thread.
- */
-static void Dalvik_dalvik_system_VMRuntime_runFinalizationSync(const u4* args,
-    JValue* pResult)
-{
-    dvmRunFinalizationSync();
-
-    RETURN_VOID();
-}
-
-/*
  * public native void startJitCompilation()
  *
  * Callback function from the framework to indicate that an app has gone
@@ -118,11 +101,11 @@ static void Dalvik_dalvik_system_VMRuntime_newNonMovableArray(const u4* args,
     ArrayObject* newArray;
 
     if (elementClass == NULL) {
-        dvmThrowException("Ljava/lang/NullPointerException;", NULL);
+        dvmThrowNullPointerException(NULL);
         RETURN_VOID();
     }
     if (length < 0) {
-        dvmThrowException("Ljava/lang/NegativeArraySizeException;", NULL);
+        dvmThrowNegativeArraySizeException(length);
         RETURN_VOID();
     }
 
@@ -144,7 +127,7 @@ static void Dalvik_dalvik_system_VMRuntime_addressOf(const u4* args,
 {
     ArrayObject* array = (ArrayObject*) args[1];
     if (!dvmIsArray(array)) {
-        dvmThrowException("Ljava/lang/IllegalArgumentException;", NULL);
+        dvmThrowIllegalArgumentException(NULL);
         RETURN_VOID();
     }
     // TODO: we should also check that this is a non-movable array.
@@ -216,8 +199,6 @@ const DalvikNativeMethod dvm_dalvik_system_VMRuntime[] = {
         Dalvik_dalvik_system_VMRuntime_newNonMovableArray },
     { "properties", "()[Ljava/lang/String;",
         Dalvik_dalvik_system_VMRuntime_properties },
-    { "runFinalizationSync", "()V",
-        Dalvik_dalvik_system_VMRuntime_runFinalizationSync },
     { "startJitCompilation", "()V",
         Dalvik_dalvik_system_VMRuntime_startJitCompilation },
     { "vmVersion", "()Ljava/lang/String;",