Bug 794981 - Part 5: Add the generated code files to version control. r=kats
authorChris Kitching <ckitching@mozilla.com>
Mon, 09 Sep 2013 08:57:36 -0400
changeset 146183 78aa104740c16f54551b1ba7a918bdb7a193020f
parent 146182 dd937e69cd401157c54b36697e1007210b371b57
child 146184 6e49ee30a8e11f673f9e25972473b7575f15749d
push id25244
push userryanvm@gmail.com
push dateMon, 09 Sep 2013 20:03:14 +0000
treeherdermozilla-central@f320b8c034bd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs794981
milestone26.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 794981 - Part 5: Add the generated code files to version control. r=kats
widget/android/GeneratedJNIWrappers.cpp
widget/android/GeneratedJNIWrappers.h
new file mode 100644
--- /dev/null
+++ b/widget/android/GeneratedJNIWrappers.cpp
@@ -0,0 +1,2819 @@
+// GENERATED CODE
+// Generated by the Java program at /build/annotationProcessors at compile time from
+// annotations on Java methods. To update, change the annotations on the corresponding Java
+// methods and rerun the build. Manually updating this file will cause your build to fail.
+
+#include "nsXPCOMStrings.h"
+#include "AndroidBridge.h"
+#include "AndroidBridgeUtilities.h"
+
+#ifdef DEBUG
+#define ALOG_BRIDGE(args...) ALOG(args)
+#else
+#define ALOG_BRIDGE(args...) ((void)0)
+#endif
+
+using namespace mozilla;
+void AndroidBridge::InitStubs(JNIEnv *jEnv) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    initInit();
+
+    mGeckoAppShellClass = getClassGlobalRef("org/mozilla/gecko/GeckoAppShell");
+    jAcknowledgeEvent = getStaticMethod("acknowledgeEvent", "()V");
+    jAddPluginViewWrapper = getStaticMethod("addPluginView", "(Landroid/view/View;FFFFZ)V");
+    jAlertsProgressListener_OnProgress = getStaticMethod("alertsProgressListener_OnProgress", "(Ljava/lang/String;JJLjava/lang/String;)V");
+    jCancelVibrate = getStaticMethod("cancelVibrate", "()V");
+    jCheckURIVisited = getStaticMethod("checkUriVisited", "(Ljava/lang/String;)V");
+    jClearMessageList = getStaticMethod("clearMessageList", "(I)V");
+    jCloseCamera = getStaticMethod("closeCamera", "()V");
+    jCloseNotification = getStaticMethod("closeNotification", "(Ljava/lang/String;)V");
+    jCreateMessageListWrapper = getStaticMethod("createMessageList", "(JJ[Ljava/lang/String;IIZI)V");
+    jCreateShortcut = getStaticMethod("createShortcut", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V");
+    jDeleteMessageWrapper = getStaticMethod("deleteMessage", "(II)V");
+    jDisableBatteryNotifications = getStaticMethod("disableBatteryNotifications", "()V");
+    jDisableNetworkNotifications = getStaticMethod("disableNetworkNotifications", "()V");
+    jDisableScreenOrientationNotifications = getStaticMethod("disableScreenOrientationNotifications", "()V");
+    jDisableSensor = getStaticMethod("disableSensor", "(I)V");
+    jEnableBatteryNotifications = getStaticMethod("enableBatteryNotifications", "()V");
+    jEnableLocation = getStaticMethod("enableLocation", "(Z)V");
+    jEnableLocationHighAccuracy = getStaticMethod("enableLocationHighAccuracy", "(Z)V");
+    jEnableNetworkNotifications = getStaticMethod("enableNetworkNotifications", "()V");
+    jEnableScreenOrientationNotifications = getStaticMethod("enableScreenOrientationNotifications", "()V");
+    jEnableSensor = getStaticMethod("enableSensor", "(I)V");
+    jGetContext = getStaticMethod("getContext", "()Landroid/content/Context;");
+    jGetCurrentBatteryInformationWrapper = getStaticMethod("getCurrentBatteryInformation", "()[D");
+    jGetCurrentNetworkInformationWrapper = getStaticMethod("getCurrentNetworkInformation", "()[D");
+    jGetDpiWrapper = getStaticMethod("getDpi", "()I");
+    jGetExtensionFromMimeTypeWrapper = getStaticMethod("getExtensionFromMimeType", "(Ljava/lang/String;)Ljava/lang/String;");
+    jGetGfxInfoDataWrapper = getStaticMethod("getGfxInfoData", "()Ljava/lang/String;");
+    jGetHandlersForMimeTypeWrapper = getStaticMethod("getHandlersForMimeType", "(Ljava/lang/String;Ljava/lang/String;)[Ljava/lang/String;");
+    jGetHandlersForURLWrapper = getStaticMethod("getHandlersForURL", "(Ljava/lang/String;Ljava/lang/String;)[Ljava/lang/String;");
+    jGetIconForExtensionWrapper = getStaticMethod("getIconForExtension", "(Ljava/lang/String;I)[B");
+    jGetMessageWrapper = getStaticMethod("getMessage", "(II)V");
+    jGetMimeTypeFromExtensionsWrapper = getStaticMethod("getMimeTypeFromExtensions", "(Ljava/lang/String;)Ljava/lang/String;");
+    jGetNextMessageInListWrapper = getStaticMethod("getNextMessageInList", "(II)V");
+    jGetProxyForURIWrapper = getStaticMethod("getProxyForURI", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/String;");
+    jGetScreenDepthWrapper = getStaticMethod("getScreenDepth", "()I");
+    jGetScreenOrientationWrapper = getStaticMethod("getScreenOrientation", "()S");
+    jGetShowPasswordSetting = getStaticMethod("getShowPasswordSetting", "()Z");
+    jGetSystemColoursWrapper = getStaticMethod("getSystemColors", "()[I");
+    jHandleGeckoMessageWrapper = getStaticMethod("handleGeckoMessage", "(Ljava/lang/String;)Ljava/lang/String;");
+    jHideProgressDialog = getStaticMethod("hideProgressDialog", "()V");
+    jInitCameraWrapper = getStaticMethod("initCamera", "(Ljava/lang/String;III)[I");
+    jIsNetworkLinkKnown = getStaticMethod("isNetworkLinkKnown", "()Z");
+    jIsNetworkLinkUp = getStaticMethod("isNetworkLinkUp", "()Z");
+    jIsTablet = getStaticMethod("isTablet", "()Z");
+    jKillAnyZombies = getStaticMethod("killAnyZombies", "()V");
+    jLockScreenOrientation = getStaticMethod("lockScreenOrientation", "(I)V");
+    jMarkURIVisited = getStaticMethod("markUriVisited", "(Ljava/lang/String;)V");
+    jMoveTaskToBack = getStaticMethod("moveTaskToBack", "()V");
+    jNotifyDefaultPrevented = getStaticMethod("notifyDefaultPrevented", "(Z)V");
+    jNotifyIME = getStaticMethod("notifyIME", "(I)V");
+    jNotifyIMEChange = getStaticMethod("notifyIMEChange", "(Ljava/lang/String;III)V");
+    jNotifyIMEContext = getStaticMethod("notifyIMEContext", "(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V");
+    jNotifyWakeLockChanged = getStaticMethod("notifyWakeLockChanged", "(Ljava/lang/String;Ljava/lang/String;)V");
+    jNotifyXreExit = getStaticMethod("onXreExit", "()V");
+    jOpenUriExternal = getStaticMethod("openUriExternal", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Z");
+    jPerformHapticFeedback = getStaticMethod("performHapticFeedback", "(Z)V");
+    jPumpMessageLoop = getStaticMethod("pumpMessageLoop", "()Z");
+    jRegisterSurfaceTextureFrameListener = getStaticMethod("registerSurfaceTextureFrameListener", "(Ljava/lang/Object;I)V");
+    jRemovePluginView = getStaticMethod("removePluginView", "(Landroid/view/View;Z)V");
+    jScanMedia = getStaticMethod("scanMedia", "(Ljava/lang/String;Ljava/lang/String;)V");
+    jScheduleRestart = getStaticMethod("scheduleRestart", "()V");
+    jSendMessageWrapper = getStaticMethod("sendMessage", "(Ljava/lang/String;Ljava/lang/String;I)V");
+    jSetFullScreen = getStaticMethod("setFullScreen", "(Z)V");
+    jSetKeepScreenOn = getStaticMethod("setKeepScreenOn", "(Z)V");
+    jSetSelectedLocale = getStaticMethod("setSelectedLocale", "(Ljava/lang/String;)V");
+    jSetURITitle = getStaticMethod("setUriTitle", "(Ljava/lang/String;Ljava/lang/String;)V");
+    jShowAlertNotificationWrapper = getStaticMethod("showAlertNotification", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V");
+    jShowFilePickerAsyncWrapper = getStaticMethod("showFilePickerAsync", "(Ljava/lang/String;J)V");
+    jShowFilePickerForExtensionsWrapper = getStaticMethod("showFilePickerForExtensions", "(Ljava/lang/String;)Ljava/lang/String;");
+    jShowFilePickerForMimeTypeWrapper = getStaticMethod("showFilePickerForMimeType", "(Ljava/lang/String;)Ljava/lang/String;");
+    jShowInputMethodPicker = getStaticMethod("showInputMethodPicker", "()V");
+    jUnlockProfile = getStaticMethod("unlockProfile", "()Z");
+    jUnlockScreenOrientation = getStaticMethod("unlockScreenOrientation", "()V");
+    jUnregisterSurfaceTextureFrameListener = getStaticMethod("unregisterSurfaceTextureFrameListener", "(Ljava/lang/Object;)V");
+    jVibrate1 = getStaticMethod("vibrate", "(J)V");
+    jVibrateA = getStaticMethod("vibrate", "([JI)V");
+
+    mGeckoJavaSamplerClass = getClassGlobalRef("org/mozilla/gecko/GeckoJavaSampler");
+    jGetFrameNameJavaProfilingWrapper = getStaticMethod("getFrameName", "(III)Ljava/lang/String;");
+    jGetSampleTimeJavaProfiling = getStaticMethod("getSampleTime", "(II)D");
+    jGetThreadNameJavaProfilingWrapper = getStaticMethod("getThreadName", "(I)Ljava/lang/String;");
+    jPauseJavaProfiling = getStaticMethod("pause", "()V");
+    jStartJavaProfiling = getStaticMethod("start", "(II)V");
+    jStopJavaProfiling = getStaticMethod("stop", "()V");
+    jUnpauseJavaProfiling = getStaticMethod("unpause", "()V");
+
+    mThumbnailHelperClass = getClassGlobalRef("org/mozilla/gecko/ThumbnailHelper");
+    jSendThumbnail = getStaticMethod("notifyThumbnail", "(Ljava/nio/ByteBuffer;IZ)V");
+
+    mGLControllerClass = getClassGlobalRef("org/mozilla/gecko/gfx/GLController");
+    jProvideEGLSurfaceWrapper = getMethod("provideEGLSurface", "()Ljavax/microedition/khronos/egl/EGLSurface;");
+
+    mLayerViewClass = getClassGlobalRef("org/mozilla/gecko/gfx/LayerView");
+    jRegisterCompositorWrapper = getStaticMethod("registerCxxCompositor", "()Lorg/mozilla/gecko/gfx/GLController;");
+
+    mNativePanZoomControllerClass = getClassGlobalRef("org/mozilla/gecko/gfx/NativePanZoomController");
+    jPostDelayedCallbackWrapper = getMethod("postDelayedCallback", "(J)V");
+    jRequestContentRepaintWrapper = getMethod("requestContentRepaint", "(FFFFF)V");
+
+    mClipboardClass = getClassGlobalRef("org/mozilla/gecko/util/Clipboard");
+    jGetClipboardTextWrapper = getStaticMethod("getText", "()Ljava/lang/String;");
+    jSetClipboardText = getStaticMethod("setText", "(Ljava/lang/CharSequence;)V");
+}
+
+void AndroidBridge::AcknowledgeEvent() {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jAcknowledgeEvent);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::AddPluginViewWrapper(jobject a0, jfloat a1, jfloat a2, jfloat a3, jfloat a4, bool a5) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(1) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    jvalue args[6];
+    args[0].l = a0;
+    args[1].f = a1;
+    args[2].f = a2;
+    args[3].f = a3;
+    args[4].f = a4;
+    args[5].z = a5;
+
+    env->CallStaticVoidMethodA(mGeckoAppShellClass, jAddPluginViewWrapper, args);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::AlertsProgressListener_OnProgress(const nsAString& a0, int64_t a1, int64_t a2, const nsAString& a3) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(2) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    jvalue args[4];
+    args[0].l = NewJavaString(env, a0);
+    args[1].j = a1;
+    args[2].j = a2;
+    args[3].l = NewJavaString(env, a3);
+
+    env->CallStaticVoidMethodA(mGeckoAppShellClass, jAlertsProgressListener_OnProgress, args);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::CancelVibrate() {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jCancelVibrate);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::CheckURIVisited(const nsAString& a0) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(1) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    jstring j0 = NewJavaString(env, a0);
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jCheckURIVisited, j0);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::ClearMessageList(int32_t a0) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jClearMessageList, a0);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::CloseCamera() {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jCloseCamera);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::CloseNotification(const nsAString& a0) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(1) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    jstring j0 = NewJavaString(env, a0);
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jCloseNotification, j0);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::CreateMessageListWrapper(int64_t a0, int64_t a1, jobjectArray a2, int32_t a3, int32_t a4, bool a5, int32_t a6) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(1) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    jvalue args[7];
+    args[0].j = a0;
+    args[1].j = a1;
+    args[2].l = a2;
+    args[3].i = a3;
+    args[4].i = a4;
+    args[5].z = a5;
+    args[6].i = a6;
+
+    env->CallStaticVoidMethodA(mGeckoAppShellClass, jCreateMessageListWrapper, args);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::CreateShortcut(const nsAString& a0, const nsAString& a1, const nsAString& a2, const nsAString& a3) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(4) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    jvalue args[4];
+    args[0].l = NewJavaString(env, a0);
+    args[1].l = NewJavaString(env, a1);
+    args[2].l = NewJavaString(env, a2);
+    args[3].l = NewJavaString(env, a3);
+
+    env->CallStaticVoidMethodA(mGeckoAppShellClass, jCreateShortcut, args);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::DeleteMessageWrapper(int32_t a0, int32_t a1) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jDeleteMessageWrapper, a0, a1);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::DisableBatteryNotifications() {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jDisableBatteryNotifications);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::DisableNetworkNotifications() {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jDisableNetworkNotifications);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::DisableScreenOrientationNotifications() {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jDisableScreenOrientationNotifications);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::DisableSensor(int32_t a0) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jDisableSensor, a0);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::EnableBatteryNotifications() {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jEnableBatteryNotifications);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::EnableLocation(bool a0) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jEnableLocation, a0);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::EnableLocationHighAccuracy(bool a0) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jEnableLocationHighAccuracy, a0);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::EnableNetworkNotifications() {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jEnableNetworkNotifications);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::EnableScreenOrientationNotifications() {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jEnableScreenOrientationNotifications);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::EnableSensor(int32_t a0) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jEnableSensor, a0);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+jobject AndroidBridge::GetContext() {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return nullptr;
+    }
+
+    if (env->PushLocalFrame(1) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return nullptr;
+    }
+
+    jobject temp = env->CallStaticObjectMethod(mGeckoAppShellClass, jGetContext);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return nullptr;
+    }
+    jobject ret = static_cast<jobject>(env->PopLocalFrame(temp));
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    return ret;
+}
+
+jdoubleArray AndroidBridge::GetCurrentBatteryInformationWrapper() {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return nullptr;
+    }
+
+    if (env->PushLocalFrame(1) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return nullptr;
+    }
+
+    jobject temp = env->CallStaticObjectMethod(mGeckoAppShellClass, jGetCurrentBatteryInformationWrapper);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return nullptr;
+    }
+    jdoubleArray ret = static_cast<jdoubleArray>(env->PopLocalFrame(temp));
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    return ret;
+}
+
+jdoubleArray AndroidBridge::GetCurrentNetworkInformationWrapper() {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return nullptr;
+    }
+
+    if (env->PushLocalFrame(1) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return nullptr;
+    }
+
+    jobject temp = env->CallStaticObjectMethod(mGeckoAppShellClass, jGetCurrentNetworkInformationWrapper);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return nullptr;
+    }
+    jdoubleArray ret = static_cast<jdoubleArray>(env->PopLocalFrame(temp));
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    return ret;
+}
+
+int32_t AndroidBridge::GetDpiWrapper() {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return 0;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return 0;
+    }
+
+    int32_t temp = env->CallStaticIntMethod(mGeckoAppShellClass, jGetDpiWrapper);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return 0;
+    }
+    env->PopLocalFrame(NULL);
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    return temp;
+}
+
+jstring AndroidBridge::GetExtensionFromMimeTypeWrapper(const nsAString& a0) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return nullptr;
+    }
+
+    if (env->PushLocalFrame(2) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return nullptr;
+    }
+
+    jstring j0 = NewJavaString(env, a0);
+
+    jobject temp = env->CallStaticObjectMethod(mGeckoAppShellClass, jGetExtensionFromMimeTypeWrapper, j0);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return nullptr;
+    }
+    jstring ret = static_cast<jstring>(env->PopLocalFrame(temp));
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    return ret;
+}
+
+jstring AndroidBridge::GetGfxInfoDataWrapper() {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return nullptr;
+    }
+
+    if (env->PushLocalFrame(1) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return nullptr;
+    }
+
+    jobject temp = env->CallStaticObjectMethod(mGeckoAppShellClass, jGetGfxInfoDataWrapper);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return nullptr;
+    }
+    jstring ret = static_cast<jstring>(env->PopLocalFrame(temp));
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    return ret;
+}
+
+jobjectArray AndroidBridge::GetHandlersForMimeTypeWrapper(const nsAString& a0, const nsAString& a1) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return nullptr;
+    }
+
+    if (env->PushLocalFrame(3) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return nullptr;
+    }
+
+    jstring j0 = NewJavaString(env, a0);
+    jstring j1 = NewJavaString(env, a1);
+
+    jobject temp = env->CallStaticObjectMethod(mGeckoAppShellClass, jGetHandlersForMimeTypeWrapper, j0, j1);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return nullptr;
+    }
+    jobjectArray ret = static_cast<jobjectArray>(env->PopLocalFrame(temp));
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    return ret;
+}
+
+jobjectArray AndroidBridge::GetHandlersForURLWrapper(const nsAString& a0, const nsAString& a1) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return nullptr;
+    }
+
+    if (env->PushLocalFrame(3) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return nullptr;
+    }
+
+    jstring j0 = NewJavaString(env, a0);
+    jstring j1 = NewJavaString(env, a1);
+
+    jobject temp = env->CallStaticObjectMethod(mGeckoAppShellClass, jGetHandlersForURLWrapper, j0, j1);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return nullptr;
+    }
+    jobjectArray ret = static_cast<jobjectArray>(env->PopLocalFrame(temp));
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    return ret;
+}
+
+jbyteArray AndroidBridge::GetIconForExtensionWrapper(const nsAString& a0, int32_t a1) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return nullptr;
+    }
+
+    if (env->PushLocalFrame(2) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return nullptr;
+    }
+
+    jstring j0 = NewJavaString(env, a0);
+
+    jobject temp = env->CallStaticObjectMethod(mGeckoAppShellClass, jGetIconForExtensionWrapper, j0, a1);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return nullptr;
+    }
+    jbyteArray ret = static_cast<jbyteArray>(env->PopLocalFrame(temp));
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    return ret;
+}
+
+void AndroidBridge::GetMessageWrapper(int32_t a0, int32_t a1) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jGetMessageWrapper, a0, a1);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+jstring AndroidBridge::GetMimeTypeFromExtensionsWrapper(const nsAString& a0) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return nullptr;
+    }
+
+    if (env->PushLocalFrame(2) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return nullptr;
+    }
+
+    jstring j0 = NewJavaString(env, a0);
+
+    jobject temp = env->CallStaticObjectMethod(mGeckoAppShellClass, jGetMimeTypeFromExtensionsWrapper, j0);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return nullptr;
+    }
+    jstring ret = static_cast<jstring>(env->PopLocalFrame(temp));
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    return ret;
+}
+
+void AndroidBridge::GetNextMessageInListWrapper(int32_t a0, int32_t a1) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jGetNextMessageInListWrapper, a0, a1);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+jstring AndroidBridge::GetProxyForURIWrapper(const nsAString& a0, const nsAString& a1, const nsAString& a2, int32_t a3) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return nullptr;
+    }
+
+    if (env->PushLocalFrame(4) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return nullptr;
+    }
+
+    jvalue args[4];
+    args[0].l = NewJavaString(env, a0);
+    args[1].l = NewJavaString(env, a1);
+    args[2].l = NewJavaString(env, a2);
+    args[3].i = a3;
+
+    jobject temp = env->CallStaticObjectMethodA(mGeckoAppShellClass, jGetProxyForURIWrapper, args);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return nullptr;
+    }
+    jstring ret = static_cast<jstring>(env->PopLocalFrame(temp));
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    return ret;
+}
+
+int32_t AndroidBridge::GetScreenDepthWrapper() {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return 0;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return 0;
+    }
+
+    int32_t temp = env->CallStaticIntMethod(mGeckoAppShellClass, jGetScreenDepthWrapper);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return 0;
+    }
+    env->PopLocalFrame(NULL);
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    return temp;
+}
+
+int16_t AndroidBridge::GetScreenOrientationWrapper() {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return 0;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return 0;
+    }
+
+    int16_t temp = env->CallStaticShortMethod(mGeckoAppShellClass, jGetScreenOrientationWrapper);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return 0;
+    }
+    env->PopLocalFrame(NULL);
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    return temp;
+}
+
+bool AndroidBridge::GetShowPasswordSetting() {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return false;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return false;
+    }
+
+    bool temp = env->CallStaticBooleanMethod(mGeckoAppShellClass, jGetShowPasswordSetting);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return false;
+    }
+    env->PopLocalFrame(NULL);
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    return temp;
+}
+
+jintArray AndroidBridge::GetSystemColoursWrapper() {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return nullptr;
+    }
+
+    if (env->PushLocalFrame(1) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return nullptr;
+    }
+
+    jobject temp = env->CallStaticObjectMethod(mGeckoAppShellClass, jGetSystemColoursWrapper);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return nullptr;
+    }
+    jintArray ret = static_cast<jintArray>(env->PopLocalFrame(temp));
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    return ret;
+}
+
+jstring AndroidBridge::HandleGeckoMessageWrapper(const nsAString& a0) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return nullptr;
+    }
+
+    if (env->PushLocalFrame(2) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return nullptr;
+    }
+
+    jstring j0 = NewJavaString(env, a0);
+
+    jobject temp = env->CallStaticObjectMethod(mGeckoAppShellClass, jHandleGeckoMessageWrapper, j0);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return nullptr;
+    }
+    jstring ret = static_cast<jstring>(env->PopLocalFrame(temp));
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    return ret;
+}
+
+void AndroidBridge::HideProgressDialog() {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jHideProgressDialog);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+jintArray AndroidBridge::InitCameraWrapper(const nsAString& a0, int32_t a1, int32_t a2, int32_t a3) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return nullptr;
+    }
+
+    if (env->PushLocalFrame(2) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return nullptr;
+    }
+
+    jvalue args[4];
+    args[0].l = NewJavaString(env, a0);
+    args[1].i = a1;
+    args[2].i = a2;
+    args[3].i = a3;
+
+    jobject temp = env->CallStaticObjectMethodA(mGeckoAppShellClass, jInitCameraWrapper, args);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return nullptr;
+    }
+    jintArray ret = static_cast<jintArray>(env->PopLocalFrame(temp));
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    return ret;
+}
+
+bool AndroidBridge::IsNetworkLinkKnown() {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return false;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return false;
+    }
+
+    bool temp = env->CallStaticBooleanMethod(mGeckoAppShellClass, jIsNetworkLinkKnown);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return false;
+    }
+    env->PopLocalFrame(NULL);
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    return temp;
+}
+
+bool AndroidBridge::IsNetworkLinkUp() {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return false;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return false;
+    }
+
+    bool temp = env->CallStaticBooleanMethod(mGeckoAppShellClass, jIsNetworkLinkUp);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return false;
+    }
+    env->PopLocalFrame(NULL);
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    return temp;
+}
+
+bool AndroidBridge::IsTablet() {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return false;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return false;
+    }
+
+    bool temp = env->CallStaticBooleanMethod(mGeckoAppShellClass, jIsTablet);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return false;
+    }
+    env->PopLocalFrame(NULL);
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    return temp;
+}
+
+void AndroidBridge::KillAnyZombies() {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jKillAnyZombies);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::LockScreenOrientation(int32_t a0) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jLockScreenOrientation, a0);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::MarkURIVisited(const nsAString& a0) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(1) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    jstring j0 = NewJavaString(env, a0);
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jMarkURIVisited, j0);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::MoveTaskToBack() {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jMoveTaskToBack);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::NotifyDefaultPrevented(bool a0) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jNotifyDefaultPrevented, a0);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::NotifyIME(int32_t a0) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    if (!sBridge) {
+        ALOG_BRIDGE("Aborted: No sBridge - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(sBridge->mGeckoAppShellClass, sBridge->jNotifyIME, a0);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::NotifyIMEChange(const nsAString& a0, int32_t a1, int32_t a2, int32_t a3) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    if (!sBridge) {
+        ALOG_BRIDGE("Aborted: No sBridge - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(1) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    jvalue args[4];
+    args[0].l = NewJavaString(env, a0);
+    args[1].i = a1;
+    args[2].i = a2;
+    args[3].i = a3;
+
+    env->CallStaticVoidMethodA(sBridge->mGeckoAppShellClass, sBridge->jNotifyIMEChange, args);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::NotifyIMEContext(int32_t a0, const nsAString& a1, const nsAString& a2, const nsAString& a3) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    if (!sBridge) {
+        ALOG_BRIDGE("Aborted: No sBridge - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(3) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    jvalue args[4];
+    args[0].i = a0;
+    args[1].l = NewJavaString(env, a1);
+    args[2].l = NewJavaString(env, a2);
+    args[3].l = NewJavaString(env, a3);
+
+    env->CallStaticVoidMethodA(sBridge->mGeckoAppShellClass, sBridge->jNotifyIMEContext, args);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::NotifyWakeLockChanged(const nsAString& a0, const nsAString& a1) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(2) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    jstring j0 = NewJavaString(env, a0);
+    jstring j1 = NewJavaString(env, a1);
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jNotifyWakeLockChanged, j0, j1);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::NotifyXreExit() {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jNotifyXreExit);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+bool AndroidBridge::OpenUriExternal(const nsAString& a0, const nsAString& a1, const nsAString& a2, const nsAString& a3, const nsAString& a4, const nsAString& a5) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return false;
+    }
+
+    if (env->PushLocalFrame(6) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return false;
+    }
+
+    jvalue args[6];
+    args[0].l = NewJavaString(env, a0);
+    args[1].l = NewJavaString(env, a1);
+    args[2].l = NewJavaString(env, a2);
+    args[3].l = NewJavaString(env, a3);
+    args[4].l = NewJavaString(env, a4);
+    args[5].l = NewJavaString(env, a5);
+
+    bool temp = env->CallStaticBooleanMethodA(mGeckoAppShellClass, jOpenUriExternal, args);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return false;
+    }
+    env->PopLocalFrame(NULL);
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    return temp;
+}
+
+void AndroidBridge::PerformHapticFeedback(bool a0) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jPerformHapticFeedback, a0);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+bool AndroidBridge::PumpMessageLoop() {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return false;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return false;
+    }
+
+    bool temp = env->CallStaticBooleanMethod(mGeckoAppShellClass, jPumpMessageLoop);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return false;
+    }
+    env->PopLocalFrame(NULL);
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    return temp;
+}
+
+void AndroidBridge::RegisterSurfaceTextureFrameListener(jobject a0, int32_t a1) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(1) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jRegisterSurfaceTextureFrameListener, a0, a1);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::RemovePluginView(jobject a0, bool a1) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(1) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jRemovePluginView, a0, a1);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::ScanMedia(const nsAString& a0, const nsAString& a1) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(2) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    jstring j0 = NewJavaString(env, a0);
+    jstring j1 = NewJavaString(env, a1);
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jScanMedia, j0, j1);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::ScheduleRestart() {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jScheduleRestart);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::SendMessageWrapper(const nsAString& a0, const nsAString& a1, int32_t a2) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(2) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    jvalue args[3];
+    args[0].l = NewJavaString(env, a0);
+    args[1].l = NewJavaString(env, a1);
+    args[2].i = a2;
+
+    env->CallStaticVoidMethodA(mGeckoAppShellClass, jSendMessageWrapper, args);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::SetFullScreen(bool a0) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jSetFullScreen, a0);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::SetKeepScreenOn(bool a0) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jSetKeepScreenOn, a0);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::SetSelectedLocale(const nsAString& a0) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(1) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    jstring j0 = NewJavaString(env, a0);
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jSetSelectedLocale, j0);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::SetURITitle(const nsAString& a0, const nsAString& a1) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(2) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    jstring j0 = NewJavaString(env, a0);
+    jstring j1 = NewJavaString(env, a1);
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jSetURITitle, j0, j1);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::ShowAlertNotificationWrapper(const nsAString& a0, const nsAString& a1, const nsAString& a2, const nsAString& a3, const nsAString& a4) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(5) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    jvalue args[5];
+    args[0].l = NewJavaString(env, a0);
+    args[1].l = NewJavaString(env, a1);
+    args[2].l = NewJavaString(env, a2);
+    args[3].l = NewJavaString(env, a3);
+    args[4].l = NewJavaString(env, a4);
+
+    env->CallStaticVoidMethodA(mGeckoAppShellClass, jShowAlertNotificationWrapper, args);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::ShowFilePickerAsyncWrapper(const nsAString& a0, int64_t a1) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(1) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    jstring j0 = NewJavaString(env, a0);
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jShowFilePickerAsyncWrapper, j0, a1);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+jstring AndroidBridge::ShowFilePickerForExtensionsWrapper(const nsAString& a0) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return nullptr;
+    }
+
+    if (env->PushLocalFrame(2) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return nullptr;
+    }
+
+    jstring j0 = NewJavaString(env, a0);
+
+    jobject temp = env->CallStaticObjectMethod(mGeckoAppShellClass, jShowFilePickerForExtensionsWrapper, j0);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return nullptr;
+    }
+    jstring ret = static_cast<jstring>(env->PopLocalFrame(temp));
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    return ret;
+}
+
+jstring AndroidBridge::ShowFilePickerForMimeTypeWrapper(const nsAString& a0) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return nullptr;
+    }
+
+    if (env->PushLocalFrame(2) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return nullptr;
+    }
+
+    jstring j0 = NewJavaString(env, a0);
+
+    jobject temp = env->CallStaticObjectMethod(mGeckoAppShellClass, jShowFilePickerForMimeTypeWrapper, j0);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return nullptr;
+    }
+    jstring ret = static_cast<jstring>(env->PopLocalFrame(temp));
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    return ret;
+}
+
+void AndroidBridge::ShowInputMethodPicker() {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jShowInputMethodPicker);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+bool AndroidBridge::UnlockProfile() {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return false;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return false;
+    }
+
+    bool temp = env->CallStaticBooleanMethod(mGeckoAppShellClass, jUnlockProfile);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return false;
+    }
+    env->PopLocalFrame(NULL);
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    return temp;
+}
+
+void AndroidBridge::UnlockScreenOrientation() {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jUnlockScreenOrientation);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::UnregisterSurfaceTextureFrameListener(jobject a0) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(1) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jUnregisterSurfaceTextureFrameListener, a0);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::Vibrate1(int64_t a0) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jVibrate1, a0);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::VibrateA(jlongArray a0, int32_t a1) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(1) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoAppShellClass, jVibrateA, a0, a1);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+jstring AndroidBridge::GetFrameNameJavaProfilingWrapper(int32_t a0, int32_t a1, int32_t a2) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return nullptr;
+    }
+
+    if (env->PushLocalFrame(1) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return nullptr;
+    }
+
+    jvalue args[3];
+    args[0].i = a0;
+    args[1].i = a1;
+    args[2].i = a2;
+
+    jobject temp = env->CallStaticObjectMethodA(mGeckoJavaSamplerClass, jGetFrameNameJavaProfilingWrapper, args);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return nullptr;
+    }
+    jstring ret = static_cast<jstring>(env->PopLocalFrame(temp));
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    return ret;
+}
+
+jdouble AndroidBridge::GetSampleTimeJavaProfiling(int32_t a0, int32_t a1) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return 0.0;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return 0.0;
+    }
+
+    jdouble temp = env->CallStaticDoubleMethod(mGeckoJavaSamplerClass, jGetSampleTimeJavaProfiling, a0, a1);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return 0.0;
+    }
+    env->PopLocalFrame(NULL);
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    return temp;
+}
+
+jstring AndroidBridge::GetThreadNameJavaProfilingWrapper(int32_t a0) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return nullptr;
+    }
+
+    if (env->PushLocalFrame(1) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return nullptr;
+    }
+
+    jobject temp = env->CallStaticObjectMethod(mGeckoJavaSamplerClass, jGetThreadNameJavaProfilingWrapper, a0);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return nullptr;
+    }
+    jstring ret = static_cast<jstring>(env->PopLocalFrame(temp));
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    return ret;
+}
+
+void AndroidBridge::PauseJavaProfiling() {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoJavaSamplerClass, jPauseJavaProfiling);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::StartJavaProfiling(int32_t a0, int32_t a1) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoJavaSamplerClass, jStartJavaProfiling, a0, a1);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::StopJavaProfiling() {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoJavaSamplerClass, jStopJavaProfiling);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::UnpauseJavaProfiling() {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallStaticVoidMethod(mGeckoJavaSamplerClass, jUnpauseJavaProfiling);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::SendThumbnail(jobject a0, int32_t a1, bool a2) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(1) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    jvalue args[3];
+    args[0].l = a0;
+    args[1].i = a1;
+    args[2].z = a2;
+
+    env->CallStaticVoidMethodA(mThumbnailHelperClass, jSendThumbnail, args);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+jobject AndroidBridge::ProvideEGLSurfaceWrapper(jobject aTarget) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return nullptr;
+    }
+
+    if (env->PushLocalFrame(1) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return nullptr;
+    }
+
+    jobject temp = env->CallObjectMethod(aTarget, jProvideEGLSurfaceWrapper);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return nullptr;
+    }
+    jobject ret = static_cast<jobject>(env->PopLocalFrame(temp));
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    return ret;
+}
+
+jobject AndroidBridge::RegisterCompositorWrapper() {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return nullptr;
+    }
+
+    if (env->PushLocalFrame(1) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return nullptr;
+    }
+
+    jobject temp = env->CallStaticObjectMethod(mLayerViewClass, jRegisterCompositorWrapper);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return nullptr;
+    }
+    jobject ret = static_cast<jobject>(env->PopLocalFrame(temp));
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    return ret;
+}
+
+void AndroidBridge::PostDelayedCallbackWrapper(jobject aTarget, int64_t a0) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    env->CallVoidMethod(aTarget, jPostDelayedCallbackWrapper, a0);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+void AndroidBridge::RequestContentRepaintWrapper(jobject aTarget, jfloat a0, jfloat a1, jfloat a2, jfloat a3, jfloat a4) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIForThread();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(0) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    jvalue args[5];
+    args[0].f = a0;
+    args[1].f = a1;
+    args[2].f = a2;
+    args[3].f = a3;
+    args[4].f = a4;
+
+    env->CallVoidMethodA(aTarget, jRequestContentRepaintWrapper, args);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
+
+jstring AndroidBridge::GetClipboardTextWrapper() {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return nullptr;
+    }
+
+    if (env->PushLocalFrame(1) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return nullptr;
+    }
+
+    jobject temp = env->CallStaticObjectMethod(mClipboardClass, jGetClipboardTextWrapper);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return nullptr;
+    }
+    jstring ret = static_cast<jstring>(env->PopLocalFrame(temp));
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    return ret;
+}
+
+void AndroidBridge::SetClipboardText(const nsAString& a0) {
+    ALOG_BRIDGE("%s", __PRETTY_FUNCTION__);
+    JNIEnv *env = GetJNIEnv();
+    if (!env) {
+        ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
+        return;
+    }
+
+    if (env->PushLocalFrame(1) != 0) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        return;
+    }
+
+    jstring j0 = NewJavaString(env, a0);
+
+    env->CallStaticVoidMethod(mClipboardClass, jSetClipboardText, j0);
+
+    if (env->ExceptionCheck()) {
+        ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
+        env->ExceptionDescribe();
+        env->ExceptionClear();
+        env->PopLocalFrame(NULL);
+        return;
+    }
+    ALOG_BRIDGE("Exit of: %s", __PRETTY_FUNCTION__);
+    env->PopLocalFrame(NULL);
+}
new file mode 100644
--- /dev/null
+++ b/widget/android/GeneratedJNIWrappers.h
@@ -0,0 +1,201 @@
+// GENERATED CODE
+// Generated by the Java program at /build/annotationProcessors at compile time from
+// annotations on Java methods. To update, change the annotations on the corresponding Java
+// methods and rerun the build. Manually updating this file will cause your build to fail.
+
+protected:
+jclass mGeckoAppShellClass;
+jmethodID jAcknowledgeEvent;
+jmethodID jAddPluginViewWrapper;
+jmethodID jAlertsProgressListener_OnProgress;
+jmethodID jCancelVibrate;
+jmethodID jCheckURIVisited;
+jmethodID jClearMessageList;
+jmethodID jCloseCamera;
+jmethodID jCloseNotification;
+jmethodID jCreateMessageListWrapper;
+jmethodID jCreateShortcut;
+jmethodID jDeleteMessageWrapper;
+jmethodID jDisableBatteryNotifications;
+jmethodID jDisableNetworkNotifications;
+jmethodID jDisableScreenOrientationNotifications;
+jmethodID jDisableSensor;
+jmethodID jEnableBatteryNotifications;
+jmethodID jEnableLocation;
+jmethodID jEnableLocationHighAccuracy;
+jmethodID jEnableNetworkNotifications;
+jmethodID jEnableScreenOrientationNotifications;
+jmethodID jEnableSensor;
+jmethodID jGetContext;
+jmethodID jGetCurrentBatteryInformationWrapper;
+jmethodID jGetCurrentNetworkInformationWrapper;
+jmethodID jGetDpiWrapper;
+jmethodID jGetExtensionFromMimeTypeWrapper;
+jmethodID jGetGfxInfoDataWrapper;
+jmethodID jGetHandlersForMimeTypeWrapper;
+jmethodID jGetHandlersForURLWrapper;
+jmethodID jGetIconForExtensionWrapper;
+jmethodID jGetMessageWrapper;
+jmethodID jGetMimeTypeFromExtensionsWrapper;
+jmethodID jGetNextMessageInListWrapper;
+jmethodID jGetProxyForURIWrapper;
+jmethodID jGetScreenDepthWrapper;
+jmethodID jGetScreenOrientationWrapper;
+jmethodID jGetShowPasswordSetting;
+jmethodID jGetSystemColoursWrapper;
+jmethodID jHandleGeckoMessageWrapper;
+jmethodID jHideProgressDialog;
+jmethodID jInitCameraWrapper;
+jmethodID jIsNetworkLinkKnown;
+jmethodID jIsNetworkLinkUp;
+jmethodID jIsTablet;
+jmethodID jKillAnyZombies;
+jmethodID jLockScreenOrientation;
+jmethodID jMarkURIVisited;
+jmethodID jMoveTaskToBack;
+jmethodID jNotifyDefaultPrevented;
+jmethodID jNotifyIME;
+jmethodID jNotifyIMEChange;
+jmethodID jNotifyIMEContext;
+jmethodID jNotifyWakeLockChanged;
+jmethodID jNotifyXreExit;
+jmethodID jOpenUriExternal;
+jmethodID jPerformHapticFeedback;
+jmethodID jPumpMessageLoop;
+jmethodID jRegisterSurfaceTextureFrameListener;
+jmethodID jRemovePluginView;
+jmethodID jScanMedia;
+jmethodID jScheduleRestart;
+jmethodID jSendMessageWrapper;
+jmethodID jSetFullScreen;
+jmethodID jSetKeepScreenOn;
+jmethodID jSetSelectedLocale;
+jmethodID jSetURITitle;
+jmethodID jShowAlertNotificationWrapper;
+jmethodID jShowFilePickerAsyncWrapper;
+jmethodID jShowFilePickerForExtensionsWrapper;
+jmethodID jShowFilePickerForMimeTypeWrapper;
+jmethodID jShowInputMethodPicker;
+jmethodID jUnlockProfile;
+jmethodID jUnlockScreenOrientation;
+jmethodID jUnregisterSurfaceTextureFrameListener;
+jmethodID jVibrate1;
+jmethodID jVibrateA;
+
+jclass mGeckoJavaSamplerClass;
+jmethodID jGetFrameNameJavaProfilingWrapper;
+jmethodID jGetSampleTimeJavaProfiling;
+jmethodID jGetThreadNameJavaProfilingWrapper;
+jmethodID jPauseJavaProfiling;
+jmethodID jStartJavaProfiling;
+jmethodID jStopJavaProfiling;
+jmethodID jUnpauseJavaProfiling;
+
+jclass mThumbnailHelperClass;
+jmethodID jSendThumbnail;
+
+jclass mGLControllerClass;
+jmethodID jProvideEGLSurfaceWrapper;
+
+jclass mLayerViewClass;
+jmethodID jRegisterCompositorWrapper;
+
+jclass mNativePanZoomControllerClass;
+jmethodID jPostDelayedCallbackWrapper;
+jmethodID jRequestContentRepaintWrapper;
+
+jclass mClipboardClass;
+jmethodID jGetClipboardTextWrapper;
+jmethodID jSetClipboardText;
+
+public:
+void AcknowledgeEvent();
+void AddPluginViewWrapper(jobject a0, jfloat a1, jfloat a2, jfloat a3, jfloat a4, bool a5);
+void AlertsProgressListener_OnProgress(const nsAString& a0, int64_t a1, int64_t a2, const nsAString& a3);
+void CancelVibrate();
+void CheckURIVisited(const nsAString& a0);
+void ClearMessageList(int32_t a0);
+void CloseCamera();
+void CloseNotification(const nsAString& a0);
+void CreateMessageListWrapper(int64_t a0, int64_t a1, jobjectArray a2, int32_t a3, int32_t a4, bool a5, int32_t a6);
+void CreateShortcut(const nsAString& a0, const nsAString& a1, const nsAString& a2, const nsAString& a3);
+void DeleteMessageWrapper(int32_t a0, int32_t a1);
+void DisableBatteryNotifications();
+void DisableNetworkNotifications();
+void DisableScreenOrientationNotifications();
+void DisableSensor(int32_t a0);
+void EnableBatteryNotifications();
+void EnableLocation(bool a0);
+void EnableLocationHighAccuracy(bool a0);
+void EnableNetworkNotifications();
+void EnableScreenOrientationNotifications();
+void EnableSensor(int32_t a0);
+jobject GetContext();
+jdoubleArray GetCurrentBatteryInformationWrapper();
+jdoubleArray GetCurrentNetworkInformationWrapper();
+int32_t GetDpiWrapper();
+jstring GetExtensionFromMimeTypeWrapper(const nsAString& a0);
+jstring GetGfxInfoDataWrapper();
+jobjectArray GetHandlersForMimeTypeWrapper(const nsAString& a0, const nsAString& a1);
+jobjectArray GetHandlersForURLWrapper(const nsAString& a0, const nsAString& a1);
+jbyteArray GetIconForExtensionWrapper(const nsAString& a0, int32_t a1);
+void GetMessageWrapper(int32_t a0, int32_t a1);
+jstring GetMimeTypeFromExtensionsWrapper(const nsAString& a0);
+void GetNextMessageInListWrapper(int32_t a0, int32_t a1);
+jstring GetProxyForURIWrapper(const nsAString& a0, const nsAString& a1, const nsAString& a2, int32_t a3);
+int32_t GetScreenDepthWrapper();
+int16_t GetScreenOrientationWrapper();
+bool GetShowPasswordSetting();
+jintArray GetSystemColoursWrapper();
+jstring HandleGeckoMessageWrapper(const nsAString& a0);
+void HideProgressDialog();
+jintArray InitCameraWrapper(const nsAString& a0, int32_t a1, int32_t a2, int32_t a3);
+bool IsNetworkLinkKnown();
+bool IsNetworkLinkUp();
+bool IsTablet();
+void KillAnyZombies();
+void LockScreenOrientation(int32_t a0);
+void MarkURIVisited(const nsAString& a0);
+void MoveTaskToBack();
+void NotifyDefaultPrevented(bool a0);
+static void NotifyIME(int32_t a0);
+static void NotifyIMEChange(const nsAString& a0, int32_t a1, int32_t a2, int32_t a3);
+static void NotifyIMEContext(int32_t a0, const nsAString& a1, const nsAString& a2, const nsAString& a3);
+void NotifyWakeLockChanged(const nsAString& a0, const nsAString& a1);
+void NotifyXreExit();
+bool OpenUriExternal(const nsAString& a0, const nsAString& a1, const nsAString& a2 = EmptyString(), const nsAString& a3 = EmptyString(), const nsAString& a4 = EmptyString(), const nsAString& a5 = EmptyString());
+void PerformHapticFeedback(bool a0);
+bool PumpMessageLoop();
+void RegisterSurfaceTextureFrameListener(jobject a0, int32_t a1);
+void RemovePluginView(jobject a0, bool a1);
+void ScanMedia(const nsAString& a0, const nsAString& a1);
+void ScheduleRestart();
+void SendMessageWrapper(const nsAString& a0, const nsAString& a1, int32_t a2);
+void SetFullScreen(bool a0);
+void SetKeepScreenOn(bool a0);
+void SetSelectedLocale(const nsAString& a0);
+void SetURITitle(const nsAString& a0, const nsAString& a1);
+void ShowAlertNotificationWrapper(const nsAString& a0, const nsAString& a1, const nsAString& a2, const nsAString& a3, const nsAString& a4);
+void ShowFilePickerAsyncWrapper(const nsAString& a0, int64_t a1);
+jstring ShowFilePickerForExtensionsWrapper(const nsAString& a0);
+jstring ShowFilePickerForMimeTypeWrapper(const nsAString& a0);
+void ShowInputMethodPicker();
+bool UnlockProfile();
+void UnlockScreenOrientation();
+void UnregisterSurfaceTextureFrameListener(jobject a0);
+void Vibrate1(int64_t a0);
+void VibrateA(jlongArray a0, int32_t a1);
+jstring GetFrameNameJavaProfilingWrapper(int32_t a0, int32_t a1, int32_t a2);
+jdouble GetSampleTimeJavaProfiling(int32_t a0, int32_t a1);
+jstring GetThreadNameJavaProfilingWrapper(int32_t a0);
+void PauseJavaProfiling();
+void StartJavaProfiling(int32_t a0, int32_t a1);
+void StopJavaProfiling();
+void UnpauseJavaProfiling();
+void SendThumbnail(jobject a0, int32_t a1, bool a2);
+jobject ProvideEGLSurfaceWrapper(jobject aTarget);
+jobject RegisterCompositorWrapper();
+void PostDelayedCallbackWrapper(jobject aTarget, int64_t a0);
+void RequestContentRepaintWrapper(jobject aTarget, jfloat a0, jfloat a1, jfloat a2, jfloat a3, jfloat a4);
+jstring GetClipboardTextWrapper();
+void SetClipboardText(const nsAString& a0);