From 0845a4594c81421404715b666f5b3c989d9b2c5c Mon Sep 17 00:00:00 2001 From: Patrick Scott Date: Mon, 26 Oct 2009 10:11:29 -0400 Subject: [PATCH] Change the assert to check for JNI_OK jniRegisterNativeMethods returns -1 (JNI_ERR) or 0 (JNI_OK), not the number of methods registered. --- WebCore/platform/android/GeolocationServiceAndroid.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebCore/platform/android/GeolocationServiceAndroid.cpp b/WebCore/platform/android/GeolocationServiceAndroid.cpp index 9e1c9198e..c4e9f0e8a 100644 --- a/WebCore/platform/android/GeolocationServiceAndroid.cpp +++ b/WebCore/platform/android/GeolocationServiceAndroid.cpp @@ -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); -- 2.11.0