Bug 1230522 - Make some unimplemented functions not be native. r=rbarker
authorKartikaya Gupta <kgupta@mozilla.com>
Thu, 10 Dec 2015 17:23:07 -0500
changeset 276129 6fb0e753c32b66c279093dfe04cc5e16fc729c03
parent 276128 d9f0f6221e06ccea601772206c8f602e1255651c
child 276130 2bf33b959e6db43963636a187f872f25a895d272
push id69057
push userkgupta@mozilla.com
push dateThu, 10 Dec 2015 22:23:39 +0000
treeherdermozilla-inbound@2bf33b959e6d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrbarker
bugs1230522
milestone45.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1230522 - Make some unimplemented functions not be native. r=rbarker
mobile/android/base/java/org/mozilla/gecko/gfx/NativePanZoomController.java
mozglue/android/jni-stubs.inc
widget/android/AndroidJNI.cpp
--- a/mobile/android/base/java/org/mozilla/gecko/gfx/NativePanZoomController.java
+++ b/mobile/android/base/java/org/mozilla/gecko/gfx/NativePanZoomController.java
@@ -87,20 +87,27 @@ class NativePanZoomController implements
     private native void init();
     private native boolean handleTouchEvent(GeckoEvent event);
     private native void handleMotionEvent(GeckoEvent event);
 
     @Override
     public native void destroy();
     @Override
     public native boolean getRedrawHint();
+
     @Override
-    public native void setOverScrollMode(int overscrollMode);
+    public void setOverScrollMode(int overscrollMode) {
+        // FIXME implement this
+    }
+
     @Override
-    public native int getOverScrollMode();
+    public int getOverScrollMode() {
+        // FIXME implement this
+        return 0;
+    }
 
     @WrapForJNI(allowMultithread = true, stubName = "RequestContentRepaintWrapper")
     private void requestContentRepaint(float x, float y, float width, float height, float resolution) {
         mTarget.forceRedraw(new DisplayPortMetrics(x, y, x + width, y + height, resolution));
     }
 
     @Override
     public void setOverscrollHandler(final Overscroll listener) {
--- a/mozglue/android/jni-stubs.inc
+++ b/mozglue/android/jni-stubs.inc
@@ -737,54 +737,16 @@ Java_org_mozilla_gecko_gfx_NativePanZoom
 #endif
 
 #ifdef JNI_BINDINGS
   xul_dlsym("Java_org_mozilla_gecko_gfx_NativePanZoomController_getRedrawHint", &f_Java_org_mozilla_gecko_gfx_NativePanZoomController_getRedrawHint);
 #endif
 
 #ifdef JNI_STUBS
 
-typedef void (*Java_org_mozilla_gecko_gfx_NativePanZoomController_setOverScrollMode_t)(JNIEnv *, jobject, jint);
-static Java_org_mozilla_gecko_gfx_NativePanZoomController_setOverScrollMode_t f_Java_org_mozilla_gecko_gfx_NativePanZoomController_setOverScrollMode;
-extern "C" NS_EXPORT void MOZ_JNICALL
-Java_org_mozilla_gecko_gfx_NativePanZoomController_setOverScrollMode(JNIEnv * arg0, jobject arg1, jint arg2) {
-    if (!f_Java_org_mozilla_gecko_gfx_NativePanZoomController_setOverScrollMode) {
-        arg0->ThrowNew(arg0->FindClass("java/lang/UnsupportedOperationException"),
-                       "JNI Function called before it was loaded");
-        return ;
-    }
-     f_Java_org_mozilla_gecko_gfx_NativePanZoomController_setOverScrollMode(arg0, arg1, arg2);
-}
-#endif
-
-#ifdef JNI_BINDINGS
-  xul_dlsym("Java_org_mozilla_gecko_gfx_NativePanZoomController_setOverScrollMode", &f_Java_org_mozilla_gecko_gfx_NativePanZoomController_setOverScrollMode);
-#endif
-
-#ifdef JNI_STUBS
-
-typedef jint (*Java_org_mozilla_gecko_gfx_NativePanZoomController_getOverScrollMode_t)(JNIEnv *, jobject);
-static Java_org_mozilla_gecko_gfx_NativePanZoomController_getOverScrollMode_t f_Java_org_mozilla_gecko_gfx_NativePanZoomController_getOverScrollMode;
-extern "C" NS_EXPORT jint MOZ_JNICALL
-Java_org_mozilla_gecko_gfx_NativePanZoomController_getOverScrollMode(JNIEnv * arg0, jobject arg1) {
-    if (!f_Java_org_mozilla_gecko_gfx_NativePanZoomController_getOverScrollMode) {
-        arg0->ThrowNew(arg0->FindClass("java/lang/UnsupportedOperationException"),
-                       "JNI Function called before it was loaded");
-        return 0;
-    }
-    return f_Java_org_mozilla_gecko_gfx_NativePanZoomController_getOverScrollMode(arg0, arg1);
-}
-#endif
-
-#ifdef JNI_BINDINGS
-  xul_dlsym("Java_org_mozilla_gecko_gfx_NativePanZoomController_getOverScrollMode", &f_Java_org_mozilla_gecko_gfx_NativePanZoomController_getOverScrollMode);
-#endif
-
-#ifdef JNI_STUBS
-
 typedef void (*Java_org_mozilla_gecko_gfx_NativePanZoomController_setIsLongpressEnabled_t)(JNIEnv *, jobject, jboolean);
 static Java_org_mozilla_gecko_gfx_NativePanZoomController_setIsLongpressEnabled_t f_Java_org_mozilla_gecko_gfx_NativePanZoomController_setIsLongpressEnabled;
 extern "C" NS_EXPORT void MOZ_JNICALL
 Java_org_mozilla_gecko_gfx_NativePanZoomController_setIsLongpressEnabled(JNIEnv * arg0, jobject arg1, jboolean arg2) {
     if (!f_Java_org_mozilla_gecko_gfx_NativePanZoomController_setIsLongpressEnabled) {
         arg0->ThrowNew(arg0->FindClass("java/lang/UnsupportedOperationException"),
                        "JNI Function called before it was loaded");
         return ;
--- a/widget/android/AndroidJNI.cpp
+++ b/widget/android/AndroidJNI.cpp
@@ -398,28 +398,14 @@ Java_org_mozilla_gecko_gfx_NativePanZoom
 NS_EXPORT jboolean JNICALL
 Java_org_mozilla_gecko_gfx_NativePanZoomController_getRedrawHint(JNIEnv* env, jobject instance)
 {
     // FIXME implement this
     return true;
 }
 
 NS_EXPORT void JNICALL
-Java_org_mozilla_gecko_gfx_NativePanZoomController_setOverScrollMode(JNIEnv* env, jobject instance, jint overscrollMode)
-{
-    // FIXME implement this
-}
-
-NS_EXPORT jint JNICALL
-Java_org_mozilla_gecko_gfx_NativePanZoomController_getOverScrollMode(JNIEnv* env, jobject instance)
-{
-    // FIXME implement this
-    return 0;
-}
-
-
-NS_EXPORT void JNICALL
 Java_org_mozilla_gecko_gfx_NativePanZoomController_setIsLongpressEnabled(JNIEnv* env, jobject instance, jboolean isLongpressEnabled)
 {
     APZCTreeManager::SetLongTapEnabled(isLongpressEnabled);
 }
 
 }