OSDN Git Service

Change the assert to check for JNI_OK
authorPatrick Scott <phanna@android.com>
Mon, 26 Oct 2009 14:11:29 +0000 (10:11 -0400)
committerPatrick Scott <phanna@android.com>
Mon, 26 Oct 2009 14:11:29 +0000 (10:11 -0400)
jniRegisterNativeMethods returns -1 (JNI_ERR) or 0 (JNI_OK), not the number of
methods registered.

WebCore/platform/android/GeolocationServiceAndroid.cpp

index 9e1c919..c4e9f0e 100644 (file)
@@ -220,7 +220,7 @@ void GeolocationServiceBridge::startJavaImplementation()
                                                      kJavaGeolocationServiceClass,
                                                      kJavaGeolocationServiceClassNativeMethods,
                                                      NELEM(kJavaGeolocationServiceClassNativeMethods));
-    ASSERT(registered == NELEM(kJavaGeolocationServiceClassNativeMethods));
+    ASSERT(registered == JNI_OK);
 
     // Set up the methods we wish to call on the Java Location class.
     jclass javaLocationClass = env->FindClass(kJavaLocationClass);