Bug 956783 - Stop using NULL in Fennec's JNI code; r=jchen
authorEhsan Akhgari <ehsan@mozilla.com>
Mon, 06 Jan 2014 15:21:27 -0500
changeset 179285 643150e6bb9d36dc40fd6579b6c96882b53216ff
parent 179284 c25ee7b8c1851d78a5f45ef83cfdf070ce7d4adb
child 179286 68af74aa746be4b1a1cb0039ba910e295c2d4ddd
push id462
push userraliiev@mozilla.com
push dateTue, 22 Apr 2014 00:22:30 +0000
treeherdermozilla-release@ac5db8c74ac0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjchen
bugs956783
milestone29.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 956783 - Stop using NULL in Fennec's JNI code; r=jchen
build/annotationProcessors/CodeGenerator.java
mobile/android/base/jni-generator.py
mozglue/android/jni-stubs.inc
widget/android/GeneratedJNIWrappers.cpp
--- a/build/annotationProcessors/CodeGenerator.java
+++ b/build/annotationProcessors/CodeGenerator.java
@@ -68,17 +68,17 @@ public class CodeGenerator {
     private void generateWrapperMethod() {
         headerPublic.append("    static ").append(mCClassName).append("* Wrap(jobject obj);\n" +
                 "    ").append(mCClassName).append("(jobject obj, JNIEnv* env) : AutoGlobalWrappedJavaObject(obj, env) {};\n");
 
         wrapperMethodBodies.append("\n").append(mCClassName).append("* ").append(mCClassName).append("::Wrap(jobject obj) {\n" +
                 "    JNIEnv *env = GetJNIForThread();\n\n" +
                 "    if (!env) {\n" +
                 "        ALOG_BRIDGE(\"Aborted: No env - %s\", __PRETTY_FUNCTION__);\n" +
-                "        return NULL;\n" +
+                "        return nullptr;\n" +
                 "    }\n\n" +
                 "    ").append(mCClassName).append("* ret = new ").append(mCClassName).append("(obj, env);\n" +
                 "    env->DeleteLocalRef(obj);\n" +
                 "    return ret;\n" +
                 "}\n");
     }
 
     private void generateMemberCommon(Member theMethod, String aCMethodName, Class<?> aClass) {
@@ -402,17 +402,17 @@ public class CodeGenerator {
 
         // Call takes class id, method id of constructor method, then arguments.
         wrapperMethodBodies.append(Utils.getClassReferenceName(mClassToWrap)).append(", ");
 
         wrapperMethodBodies.append(mMembersToIds.get(theCtor))
         // Tack on the arguments, if any..
                            .append(argumentContent)
                            .append("), env);\n" +
-                                   "    env->PopLocalFrame(NULL);\n" +
+                                   "    env->PopLocalFrame(nullptr);\n" +
                                    "}\n");
     }
 
     /**
      * Generates the method body of the C++ wrapper function for the Java method indicated.
      *
      * @param methodSignature The previously-generated C++ method signature for the method to be
      *                        generated.
@@ -479,35 +479,35 @@ public class CodeGenerator {
         wrapperMethodBodies.append(argumentContent)
                            .append(");\n\n");
 
         // Check for exception and return the failure value..
         wrapperMethodBodies.append("    if (env->ExceptionCheck()) {\n" +
                                    "        ALOG_BRIDGE(\"Exceptional exit of: %s\", __PRETTY_FUNCTION__);\n" +
                                    "        env->ExceptionDescribe();\n" +
                                    "        env->ExceptionClear();\n" +
-                                   "        env->PopLocalFrame(NULL);\n" +
+                                   "        env->PopLocalFrame(nullptr);\n" +
                                    "        return").append(Utils.getFailureReturnForType(returnType)).append(";\n" +
                                    "    }\n\n");
 
         // If we're returning an object, pop the callee's stack frame extracting our ref as the return
         // value.
         if (isObjectReturningMethod) {
             wrapperMethodBodies.append("    ")
                                .append(Utils.getCReturnType(returnType))
                                .append(" ret = static_cast<").append(Utils.getCReturnType(returnType)).append(">(env->PopLocalFrame(temp));\n" +
                                        "    return ret;\n");
         } else if (!returnType.getCanonicalName().equals("void")) {
             // If we're a primitive-returning function, just return the directly-obtained primative
             // from the call to Java.
-            wrapperMethodBodies.append("    env->PopLocalFrame(NULL);\n" +
+            wrapperMethodBodies.append("    env->PopLocalFrame(nullptr);\n" +
                                        "    return temp;\n");
         } else {
             // If we don't return anything, just pop the stack frame and move on with life.
-            wrapperMethodBodies.append("    env->PopLocalFrame(NULL);\n");
+            wrapperMethodBodies.append("    env->PopLocalFrame(nullptr);\n");
         }
         wrapperMethodBodies.append("}\n");
     }
 
     /**
      * Generates the code to get the id of the given member on startup.
      *
      * @param aMember         The Java member being wrapped.
--- a/mobile/android/base/jni-generator.py
+++ b/mobile/android/base/jni-generator.py
@@ -63,17 +63,17 @@ class Generator:
 
             match = re.match(paramsRegex, line)
             if match:
                 paramTypes = re.split('\s*,\s*', match.group(1))
                 paramNames = ['arg%d' % i for i in range(0, len(paramTypes))]
                 if returnType == 'void':
                     returnValue = ''
                 elif returnType in ('jobject', 'jstring'):
-                    returnValue = 'NULL'
+                    returnValue = 'nullptr'
                 elif returnType in ('jint', 'jfloat', 'jdouble', 'jlong'):
                     returnValue = '0'
                 elif returnType == 'jboolean':
                     returnValue = 'false'
                 else:
                     raise Exception(('Unsupported JNI return type %s found; '
                                      + 'please update mobile/android/base/'
                                      + 'jni-generator.py to handle this case!')
--- a/mozglue/android/jni-stubs.inc
+++ b/mozglue/android/jni-stubs.inc
@@ -60,17 +60,17 @@ Java_org_mozilla_gecko_GeckoAppShell_onR
 
 typedef jobject (*Java_org_mozilla_gecko_GeckoAppShell_getNextMessageFromQueue_t)(JNIEnv *, jclass, jobject);
 static Java_org_mozilla_gecko_GeckoAppShell_getNextMessageFromQueue_t f_Java_org_mozilla_gecko_GeckoAppShell_getNextMessageFromQueue;
 extern "C" NS_EXPORT jobject JNICALL
 Java_org_mozilla_gecko_GeckoAppShell_getNextMessageFromQueue(JNIEnv * arg0, jclass arg1, jobject arg2) {
     if (!f_Java_org_mozilla_gecko_GeckoAppShell_getNextMessageFromQueue) {
         arg0->ThrowNew(arg0->FindClass("java/lang/UnsupportedOperationException"),
                        "JNI Function called before it was loaded");
-        return NULL;
+        return nullptr;
     }
     return f_Java_org_mozilla_gecko_GeckoAppShell_getNextMessageFromQueue(arg0, arg1, arg2);
 }
 #endif
 
 #ifdef JNI_BINDINGS
   xul_dlsym("Java_org_mozilla_gecko_GeckoAppShell_getNextMessageFromQueue", &f_Java_org_mozilla_gecko_GeckoAppShell_getNextMessageFromQueue);
 #endif
@@ -231,17 +231,17 @@ Java_org_mozilla_gecko_GeckoAppShell_com
 
 typedef jobject (*Java_org_mozilla_gecko_GeckoAppShell_getSurfaceBits_t)(JNIEnv *, jclass, jobject);
 static Java_org_mozilla_gecko_GeckoAppShell_getSurfaceBits_t f_Java_org_mozilla_gecko_GeckoAppShell_getSurfaceBits;
 extern "C" NS_EXPORT jobject JNICALL
 Java_org_mozilla_gecko_GeckoAppShell_getSurfaceBits(JNIEnv * arg0, jclass arg1, jobject arg2) {
     if (!f_Java_org_mozilla_gecko_GeckoAppShell_getSurfaceBits) {
         arg0->ThrowNew(arg0->FindClass("java/lang/UnsupportedOperationException"),
                        "JNI Function called before it was loaded");
-        return NULL;
+        return nullptr;
     }
     return f_Java_org_mozilla_gecko_GeckoAppShell_getSurfaceBits(arg0, arg1, arg2);
 }
 #endif
 
 #ifdef JNI_BINDINGS
   xul_dlsym("Java_org_mozilla_gecko_GeckoAppShell_getSurfaceBits", &f_Java_org_mozilla_gecko_GeckoAppShell_getSurfaceBits);
 #endif
@@ -554,17 +554,17 @@ Java_org_mozilla_gecko_ANRReporter_reque
 
 typedef jstring (*Java_org_mozilla_gecko_ANRReporter_getNativeStack_t)(JNIEnv *, jclass);
 static Java_org_mozilla_gecko_ANRReporter_getNativeStack_t f_Java_org_mozilla_gecko_ANRReporter_getNativeStack;
 extern "C" NS_EXPORT jstring JNICALL
 Java_org_mozilla_gecko_ANRReporter_getNativeStack(JNIEnv * arg0, jclass arg1) {
     if (!f_Java_org_mozilla_gecko_ANRReporter_getNativeStack) {
         arg0->ThrowNew(arg0->FindClass("java/lang/UnsupportedOperationException"),
                        "JNI Function called before it was loaded");
-        return NULL;
+        return nullptr;
     }
     return f_Java_org_mozilla_gecko_ANRReporter_getNativeStack(arg0, arg1);
 }
 #endif
 
 #ifdef JNI_BINDINGS
   xul_dlsym("Java_org_mozilla_gecko_ANRReporter_getNativeStack", &f_Java_org_mozilla_gecko_ANRReporter_getNativeStack);
 #endif
--- a/widget/android/GeneratedJNIWrappers.cpp
+++ b/widget/android/GeneratedJNIWrappers.cpp
@@ -172,17 +172,17 @@ void GeckoAppShell::InitStubs(JNIEnv *jE
     jVibrateA = getStaticMethod("vibrate", "([JI)V");
 }
 
 GeckoAppShell* GeckoAppShell::Wrap(jobject obj) {
     JNIEnv *env = GetJNIForThread();
 
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
-        return NULL;
+        return nullptr;
     }
 
     GeckoAppShell* ret = new GeckoAppShell(obj, env);
     env->DeleteLocalRef(obj);
     return ret;
 }
 
 void GeckoAppShell::AcknowledgeEvent() {
@@ -200,21 +200,21 @@ void GeckoAppShell::AcknowledgeEvent() {
     }
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jAcknowledgeEvent);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::AddPluginViewWrapper(jobject a0, jfloat a1, jfloat a2, jfloat a3, jfloat a4, bool a5) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -235,21 +235,21 @@ void GeckoAppShell::AddPluginViewWrapper
     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;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::AlertsProgressListener_OnProgress(const nsAString& a0, int64_t a1, int64_t a2, const nsAString& a3) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -268,21 +268,21 @@ void GeckoAppShell::AlertsProgressListen
     args[3].l = AndroidBridge::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;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::CancelVibrate() {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -295,21 +295,21 @@ void GeckoAppShell::CancelVibrate() {
     }
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jCancelVibrate);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::CheckURIVisited(const nsAString& a0) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -324,21 +324,21 @@ void GeckoAppShell::CheckURIVisited(cons
     jstring j0 = AndroidBridge::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;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::ClearMessageList(int32_t a0) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -351,21 +351,21 @@ void GeckoAppShell::ClearMessageList(int
     }
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jClearMessageList, a0);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::CloseCamera() {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -378,21 +378,21 @@ void GeckoAppShell::CloseCamera() {
     }
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jCloseCamera);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::CloseNotification(const nsAString& a0) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -407,21 +407,21 @@ void GeckoAppShell::CloseNotification(co
     jstring j0 = AndroidBridge::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;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::CreateMessageListWrapper(int64_t a0, int64_t a1, jobjectArray a2, int32_t a3, int32_t a4, bool a5, int32_t a6) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -443,21 +443,21 @@ void GeckoAppShell::CreateMessageListWra
     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;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::CreateShortcut(const nsAString& a0, const nsAString& a1, const nsAString& a2, const nsAString& a3) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -476,21 +476,21 @@ void GeckoAppShell::CreateShortcut(const
     args[3].l = AndroidBridge::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;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::DeleteMessageWrapper(int32_t a0, int32_t a1) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -503,21 +503,21 @@ void GeckoAppShell::DeleteMessageWrapper
     }
 
     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;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::DisableBatteryNotifications() {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -530,21 +530,21 @@ void GeckoAppShell::DisableBatteryNotifi
     }
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jDisableBatteryNotifications);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::DisableNetworkNotifications() {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -557,21 +557,21 @@ void GeckoAppShell::DisableNetworkNotifi
     }
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jDisableNetworkNotifications);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::DisableScreenOrientationNotifications() {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -584,21 +584,21 @@ void GeckoAppShell::DisableScreenOrienta
     }
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jDisableScreenOrientationNotifications);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::DisableSensor(int32_t a0) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -611,21 +611,21 @@ void GeckoAppShell::DisableSensor(int32_
     }
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jDisableSensor, a0);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::EnableBatteryNotifications() {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -638,21 +638,21 @@ void GeckoAppShell::EnableBatteryNotific
     }
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jEnableBatteryNotifications);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::EnableLocation(bool a0) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -665,21 +665,21 @@ void GeckoAppShell::EnableLocation(bool 
     }
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jEnableLocation, a0);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::EnableLocationHighAccuracy(bool a0) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -692,21 +692,21 @@ void GeckoAppShell::EnableLocationHighAc
     }
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jEnableLocationHighAccuracy, a0);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::EnableNetworkNotifications() {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -719,21 +719,21 @@ void GeckoAppShell::EnableNetworkNotific
     }
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jEnableNetworkNotifications);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::EnableScreenOrientationNotifications() {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -746,21 +746,21 @@ void GeckoAppShell::EnableScreenOrientat
     }
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jEnableScreenOrientationNotifications);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::EnableSensor(int32_t a0) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -773,21 +773,21 @@ void GeckoAppShell::EnableSensor(int32_t
     }
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jEnableSensor, a0);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 jobject GeckoAppShell::GetContext() {
     JNIEnv *env = GetJNIForThread();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return nullptr;
     }
@@ -800,17 +800,17 @@ jobject GeckoAppShell::GetContext() {
     }
 
     jobject temp = env->CallStaticObjectMethod(mGeckoAppShellClass, jGetContext);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
         return nullptr;
     }
 
     jobject ret = static_cast<jobject>(env->PopLocalFrame(temp));
     return ret;
 }
 
 jdoubleArray GeckoAppShell::GetCurrentBatteryInformationWrapper() {
@@ -828,17 +828,17 @@ jdoubleArray GeckoAppShell::GetCurrentBa
     }
 
     jobject temp = env->CallStaticObjectMethod(mGeckoAppShellClass, jGetCurrentBatteryInformationWrapper);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
         return nullptr;
     }
 
     jdoubleArray ret = static_cast<jdoubleArray>(env->PopLocalFrame(temp));
     return ret;
 }
 
 jdoubleArray GeckoAppShell::GetCurrentNetworkInformationWrapper() {
@@ -856,17 +856,17 @@ jdoubleArray GeckoAppShell::GetCurrentNe
     }
 
     jobject temp = env->CallStaticObjectMethod(mGeckoAppShellClass, jGetCurrentNetworkInformationWrapper);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
         return nullptr;
     }
 
     jdoubleArray ret = static_cast<jdoubleArray>(env->PopLocalFrame(temp));
     return ret;
 }
 
 jfloat GeckoAppShell::GetDensity() {
@@ -884,21 +884,21 @@ jfloat GeckoAppShell::GetDensity() {
     }
 
     jfloat temp = env->CallStaticFloatMethod(mGeckoAppShellClass, jGetDensity);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
         return 0.0;
     }
 
-    env->PopLocalFrame(NULL);
+    env->PopLocalFrame(nullptr);
     return temp;
 }
 
 int32_t GeckoAppShell::GetDpiWrapper() {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return 0;
@@ -912,21 +912,21 @@ int32_t GeckoAppShell::GetDpiWrapper() {
     }
 
     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);
+        env->PopLocalFrame(nullptr);
         return 0;
     }
 
-    env->PopLocalFrame(NULL);
+    env->PopLocalFrame(nullptr);
     return temp;
 }
 
 jstring GeckoAppShell::GetExtensionFromMimeTypeWrapper(const nsAString& a0) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return nullptr;
@@ -942,17 +942,17 @@ jstring GeckoAppShell::GetExtensionFromM
     jstring j0 = AndroidBridge::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);
+        env->PopLocalFrame(nullptr);
         return nullptr;
     }
 
     jstring ret = static_cast<jstring>(env->PopLocalFrame(temp));
     return ret;
 }
 
 jobjectArray GeckoAppShell::GetHandlersForMimeTypeWrapper(const nsAString& a0, const nsAString& a1) {
@@ -973,17 +973,17 @@ jobjectArray GeckoAppShell::GetHandlersF
     jstring j1 = AndroidBridge::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);
+        env->PopLocalFrame(nullptr);
         return nullptr;
     }
 
     jobjectArray ret = static_cast<jobjectArray>(env->PopLocalFrame(temp));
     return ret;
 }
 
 jobjectArray GeckoAppShell::GetHandlersForURLWrapper(const nsAString& a0, const nsAString& a1) {
@@ -1004,17 +1004,17 @@ jobjectArray GeckoAppShell::GetHandlersF
     jstring j1 = AndroidBridge::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);
+        env->PopLocalFrame(nullptr);
         return nullptr;
     }
 
     jobjectArray ret = static_cast<jobjectArray>(env->PopLocalFrame(temp));
     return ret;
 }
 
 jbyteArray GeckoAppShell::GetIconForExtensionWrapper(const nsAString& a0, int32_t a1) {
@@ -1034,17 +1034,17 @@ jbyteArray GeckoAppShell::GetIconForExte
     jstring j0 = AndroidBridge::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);
+        env->PopLocalFrame(nullptr);
         return nullptr;
     }
 
     jbyteArray ret = static_cast<jbyteArray>(env->PopLocalFrame(temp));
     return ret;
 }
 
 void GeckoAppShell::GetMessageWrapper(int32_t a0, int32_t a1) {
@@ -1062,21 +1062,21 @@ void GeckoAppShell::GetMessageWrapper(in
     }
 
     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;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 jstring GeckoAppShell::GetMimeTypeFromExtensionsWrapper(const nsAString& a0) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return nullptr;
     }
@@ -1091,17 +1091,17 @@ jstring GeckoAppShell::GetMimeTypeFromEx
     jstring j0 = AndroidBridge::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);
+        env->PopLocalFrame(nullptr);
         return nullptr;
     }
 
     jstring ret = static_cast<jstring>(env->PopLocalFrame(temp));
     return ret;
 }
 
 void GeckoAppShell::GetNextMessageInListWrapper(int32_t a0, int32_t a1) {
@@ -1119,21 +1119,21 @@ void GeckoAppShell::GetNextMessageInList
     }
 
     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;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 jstring GeckoAppShell::GetProxyForURIWrapper(const nsAString& a0, const nsAString& a1, const nsAString& a2, int32_t a3) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return nullptr;
     }
@@ -1152,17 +1152,17 @@ jstring GeckoAppShell::GetProxyForURIWra
     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);
+        env->PopLocalFrame(nullptr);
         return nullptr;
     }
 
     jstring ret = static_cast<jstring>(env->PopLocalFrame(temp));
     return ret;
 }
 
 int32_t GeckoAppShell::GetScreenDepthWrapper() {
@@ -1180,21 +1180,21 @@ int32_t GeckoAppShell::GetScreenDepthWra
     }
 
     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);
+        env->PopLocalFrame(nullptr);
         return 0;
     }
 
-    env->PopLocalFrame(NULL);
+    env->PopLocalFrame(nullptr);
     return temp;
 }
 
 int16_t GeckoAppShell::GetScreenOrientationWrapper() {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return 0;
@@ -1208,21 +1208,21 @@ int16_t GeckoAppShell::GetScreenOrientat
     }
 
     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);
+        env->PopLocalFrame(nullptr);
         return 0;
     }
 
-    env->PopLocalFrame(NULL);
+    env->PopLocalFrame(nullptr);
     return temp;
 }
 
 bool GeckoAppShell::GetShowPasswordSetting() {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return false;
@@ -1236,21 +1236,21 @@ bool GeckoAppShell::GetShowPasswordSetti
     }
 
     bool temp = env->CallStaticBooleanMethod(mGeckoAppShellClass, jGetShowPasswordSetting);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
         return false;
     }
 
-    env->PopLocalFrame(NULL);
+    env->PopLocalFrame(nullptr);
     return temp;
 }
 
 jintArray GeckoAppShell::GetSystemColoursWrapper() {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return nullptr;
@@ -1264,17 +1264,17 @@ jintArray GeckoAppShell::GetSystemColour
     }
 
     jobject temp = env->CallStaticObjectMethod(mGeckoAppShellClass, jGetSystemColoursWrapper);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
         return nullptr;
     }
 
     jintArray ret = static_cast<jintArray>(env->PopLocalFrame(temp));
     return ret;
 }
 
 jstring GeckoAppShell::HandleGeckoMessageWrapper(const nsAString& a0) {
@@ -1294,17 +1294,17 @@ jstring GeckoAppShell::HandleGeckoMessag
     jstring j0 = AndroidBridge::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);
+        env->PopLocalFrame(nullptr);
         return nullptr;
     }
 
     jstring ret = static_cast<jstring>(env->PopLocalFrame(temp));
     return ret;
 }
 
 void GeckoAppShell::HideProgressDialog() {
@@ -1322,21 +1322,21 @@ void GeckoAppShell::HideProgressDialog()
     }
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jHideProgressDialog);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 jintArray GeckoAppShell::InitCameraWrapper(const nsAString& a0, int32_t a1, int32_t a2, int32_t a3) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return nullptr;
     }
@@ -1355,17 +1355,17 @@ jintArray GeckoAppShell::InitCameraWrapp
     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);
+        env->PopLocalFrame(nullptr);
         return nullptr;
     }
 
     jintArray ret = static_cast<jintArray>(env->PopLocalFrame(temp));
     return ret;
 }
 
 bool GeckoAppShell::IsNetworkLinkKnown() {
@@ -1383,21 +1383,21 @@ bool GeckoAppShell::IsNetworkLinkKnown()
     }
 
     bool temp = env->CallStaticBooleanMethod(mGeckoAppShellClass, jIsNetworkLinkKnown);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
         return false;
     }
 
-    env->PopLocalFrame(NULL);
+    env->PopLocalFrame(nullptr);
     return temp;
 }
 
 bool GeckoAppShell::IsNetworkLinkUp() {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return false;
@@ -1411,21 +1411,21 @@ bool GeckoAppShell::IsNetworkLinkUp() {
     }
 
     bool temp = env->CallStaticBooleanMethod(mGeckoAppShellClass, jIsNetworkLinkUp);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
         return false;
     }
 
-    env->PopLocalFrame(NULL);
+    env->PopLocalFrame(nullptr);
     return temp;
 }
 
 bool GeckoAppShell::IsTablet() {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return false;
@@ -1439,21 +1439,21 @@ bool GeckoAppShell::IsTablet() {
     }
 
     bool temp = env->CallStaticBooleanMethod(mGeckoAppShellClass, jIsTablet);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
         return false;
     }
 
-    env->PopLocalFrame(NULL);
+    env->PopLocalFrame(nullptr);
     return temp;
 }
 
 void GeckoAppShell::KillAnyZombies() {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
@@ -1467,21 +1467,21 @@ void GeckoAppShell::KillAnyZombies() {
     }
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jKillAnyZombies);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 jclass GeckoAppShell::LoadPluginClass(const nsAString& a0, const nsAString& a1) {
     JNIEnv *env = GetJNIForThread();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return nullptr;
     }
@@ -1497,17 +1497,17 @@ jclass GeckoAppShell::LoadPluginClass(co
     jstring j1 = AndroidBridge::NewJavaString(env, a1);
 
     jobject temp = env->CallStaticObjectMethod(mGeckoAppShellClass, jLoadPluginClass, j0, j1);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
         return nullptr;
     }
 
     jclass ret = static_cast<jclass>(env->PopLocalFrame(temp));
     return ret;
 }
 
 void GeckoAppShell::LockScreenOrientation(int32_t a0) {
@@ -1525,21 +1525,21 @@ void GeckoAppShell::LockScreenOrientatio
     }
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jLockScreenOrientation, a0);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::MarkURIVisited(const nsAString& a0) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -1554,21 +1554,21 @@ void GeckoAppShell::MarkURIVisited(const
     jstring j0 = AndroidBridge::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;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::MoveTaskToBack() {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -1581,21 +1581,21 @@ void GeckoAppShell::MoveTaskToBack() {
     }
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jMoveTaskToBack);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 int32_t GeckoAppShell::NetworkLinkType() {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return 0;
     }
@@ -1608,21 +1608,21 @@ int32_t GeckoAppShell::NetworkLinkType()
     }
 
     int32_t temp = env->CallStaticIntMethod(mGeckoAppShellClass, jNetworkLinkType);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
         return 0;
     }
 
-    env->PopLocalFrame(NULL);
+    env->PopLocalFrame(nullptr);
     return temp;
 }
 
 void GeckoAppShell::NotifyDefaultPrevented(bool a0) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
@@ -1636,21 +1636,21 @@ void GeckoAppShell::NotifyDefaultPrevent
     }
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jNotifyDefaultPrevented, a0);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::NotifyIME(int32_t a0) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -1663,21 +1663,21 @@ void GeckoAppShell::NotifyIME(int32_t a0
     }
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jNotifyIME, a0);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::NotifyIMEChange(const nsAString& a0, int32_t a1, int32_t a2, int32_t a3) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -1696,21 +1696,21 @@ void GeckoAppShell::NotifyIMEChange(cons
     args[3].i = a3;
 
     env->CallStaticVoidMethodA(mGeckoAppShellClass, jNotifyIMEChange, args);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::NotifyIMEContext(int32_t a0, const nsAString& a1, const nsAString& a2, const nsAString& a3) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -1729,21 +1729,21 @@ void GeckoAppShell::NotifyIMEContext(int
     args[3].l = AndroidBridge::NewJavaString(env, a3);
 
     env->CallStaticVoidMethodA(mGeckoAppShellClass, jNotifyIMEContext, args);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::NotifyWakeLockChanged(const nsAString& a0, const nsAString& a1) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -1759,21 +1759,21 @@ void GeckoAppShell::NotifyWakeLockChange
     jstring j1 = AndroidBridge::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;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::NotifyXreExit() {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -1786,21 +1786,21 @@ void GeckoAppShell::NotifyXreExit() {
     }
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jNotifyXreExit);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 bool GeckoAppShell::OpenUriExternal(const nsAString& a0, const nsAString& a1, const nsAString& a2, const nsAString& a3, const nsAString& a4, const nsAString& a5) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return false;
     }
@@ -1821,21 +1821,21 @@ bool GeckoAppShell::OpenUriExternal(cons
     args[5].l = AndroidBridge::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);
+        env->PopLocalFrame(nullptr);
         return false;
     }
 
-    env->PopLocalFrame(NULL);
+    env->PopLocalFrame(nullptr);
     return temp;
 }
 
 void GeckoAppShell::PerformHapticFeedback(bool a0) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
@@ -1849,21 +1849,21 @@ void GeckoAppShell::PerformHapticFeedbac
     }
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jPerformHapticFeedback, a0);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 bool GeckoAppShell::PumpMessageLoop() {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return false;
     }
@@ -1876,21 +1876,21 @@ bool GeckoAppShell::PumpMessageLoop() {
     }
 
     bool temp = env->CallStaticBooleanMethod(mGeckoAppShellClass, jPumpMessageLoop);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
         return false;
     }
 
-    env->PopLocalFrame(NULL);
+    env->PopLocalFrame(nullptr);
     return temp;
 }
 
 void GeckoAppShell::RegisterSurfaceTextureFrameListener(jobject a0, int32_t a1) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
@@ -1904,21 +1904,21 @@ void GeckoAppShell::RegisterSurfaceTextu
     }
 
     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;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::RemovePluginView(jobject a0, bool a1) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -1931,21 +1931,21 @@ void GeckoAppShell::RemovePluginView(job
     }
 
     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;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::ScanMedia(const nsAString& a0, const nsAString& a1) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -1961,21 +1961,21 @@ void GeckoAppShell::ScanMedia(const nsAS
     jstring j1 = AndroidBridge::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;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::ScheduleRestart() {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -1988,21 +1988,21 @@ void GeckoAppShell::ScheduleRestart() {
     }
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jScheduleRestart);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::SendMessageWrapper(const nsAString& a0, const nsAString& a1, int32_t a2) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -2020,21 +2020,21 @@ void GeckoAppShell::SendMessageWrapper(c
     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;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::SetFullScreen(bool a0) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -2047,21 +2047,21 @@ void GeckoAppShell::SetFullScreen(bool a
     }
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jSetFullScreen, a0);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::SetKeepScreenOn(bool a0) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -2074,21 +2074,21 @@ void GeckoAppShell::SetKeepScreenOn(bool
     }
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jSetKeepScreenOn, a0);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::SetURITitle(const nsAString& a0, const nsAString& a1) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -2104,21 +2104,21 @@ void GeckoAppShell::SetURITitle(const ns
     jstring j1 = AndroidBridge::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;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::ShowAlertNotificationWrapper(const nsAString& a0, const nsAString& a1, const nsAString& a2, const nsAString& a3, const nsAString& a4) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -2138,21 +2138,21 @@ void GeckoAppShell::ShowAlertNotificatio
     args[4].l = AndroidBridge::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;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::ShowFilePickerAsyncWrapper(const nsAString& a0, int64_t a1) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -2167,21 +2167,21 @@ void GeckoAppShell::ShowFilePickerAsyncW
     jstring j0 = AndroidBridge::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;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 jstring GeckoAppShell::ShowFilePickerForExtensionsWrapper(const nsAString& a0) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return nullptr;
     }
@@ -2196,17 +2196,17 @@ jstring GeckoAppShell::ShowFilePickerFor
     jstring j0 = AndroidBridge::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);
+        env->PopLocalFrame(nullptr);
         return nullptr;
     }
 
     jstring ret = static_cast<jstring>(env->PopLocalFrame(temp));
     return ret;
 }
 
 jstring GeckoAppShell::ShowFilePickerForMimeTypeWrapper(const nsAString& a0) {
@@ -2226,17 +2226,17 @@ jstring GeckoAppShell::ShowFilePickerFor
     jstring j0 = AndroidBridge::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);
+        env->PopLocalFrame(nullptr);
         return nullptr;
     }
 
     jstring ret = static_cast<jstring>(env->PopLocalFrame(temp));
     return ret;
 }
 
 void GeckoAppShell::ShowInputMethodPicker() {
@@ -2254,21 +2254,21 @@ void GeckoAppShell::ShowInputMethodPicke
     }
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jShowInputMethodPicker);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 bool GeckoAppShell::UnlockProfile() {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return false;
     }
@@ -2281,21 +2281,21 @@ bool GeckoAppShell::UnlockProfile() {
     }
 
     bool temp = env->CallStaticBooleanMethod(mGeckoAppShellClass, jUnlockProfile);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
         return false;
     }
 
-    env->PopLocalFrame(NULL);
+    env->PopLocalFrame(nullptr);
     return temp;
 }
 
 void GeckoAppShell::UnlockScreenOrientation() {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
@@ -2309,21 +2309,21 @@ void GeckoAppShell::UnlockScreenOrientat
     }
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jUnlockScreenOrientation);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::UnregisterSurfaceTextureFrameListener(jobject a0) {
     JNIEnv *env = GetJNIForThread();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -2336,21 +2336,21 @@ void GeckoAppShell::UnregisterSurfaceTex
     }
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jUnregisterSurfaceTextureFrameListener, a0);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::Vibrate1(int64_t a0) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -2363,21 +2363,21 @@ void GeckoAppShell::Vibrate1(int64_t a0)
     }
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jVibrate1, a0);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoAppShell::VibrateA(jlongArray a0, int32_t a1) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -2390,21 +2390,21 @@ void GeckoAppShell::VibrateA(jlongArray 
     }
 
     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;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 jclass JavaDomKeyLocation::mDomKeyLocationClass = 0;
 jmethodID JavaDomKeyLocation::jvalueOf = 0;
 jmethodID JavaDomKeyLocation::jvalues = 0;
 jfieldID JavaDomKeyLocation::jDOM_KEY_LOCATION_JOYSTICK = 0;
 jfieldID JavaDomKeyLocation::jDOM_KEY_LOCATION_LEFT = 0;
 jfieldID JavaDomKeyLocation::jDOM_KEY_LOCATION_MOBILE = 0;
 jfieldID JavaDomKeyLocation::jDOM_KEY_LOCATION_NUMPAD = 0;
@@ -2426,17 +2426,17 @@ void JavaDomKeyLocation::InitStubs(JNIEn
     jvalue = getField("value", "I");
 }
 
 JavaDomKeyLocation* JavaDomKeyLocation::Wrap(jobject obj) {
     JNIEnv *env = GetJNIForThread();
 
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
-        return NULL;
+        return nullptr;
     }
 
     JavaDomKeyLocation* ret = new JavaDomKeyLocation(obj, env);
     env->DeleteLocalRef(obj);
     return ret;
 }
 
 jobject JavaDomKeyLocation::valueOf(const nsAString& a0) {
@@ -2456,17 +2456,17 @@ jobject JavaDomKeyLocation::valueOf(cons
     jstring j0 = AndroidBridge::NewJavaString(env, a0);
 
     jobject temp = env->CallStaticObjectMethod(mDomKeyLocationClass, jvalueOf, j0);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
         return nullptr;
     }
 
     jobject ret = static_cast<jobject>(env->PopLocalFrame(temp));
     return ret;
 }
 
 jobjectArray JavaDomKeyLocation::values() {
@@ -2484,17 +2484,17 @@ jobjectArray JavaDomKeyLocation::values(
     }
 
     jobject temp = env->CallStaticObjectMethod(mDomKeyLocationClass, jvalues);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
         return nullptr;
     }
 
     jobjectArray ret = static_cast<jobjectArray>(env->PopLocalFrame(temp));
     return ret;
 }
 
 jobject JavaDomKeyLocation::getDOM_KEY_LOCATION_JOYSTICK() {
@@ -2587,17 +2587,17 @@ void GeckoJavaSampler::InitStubs(JNIEnv 
     jUnpauseJavaProfiling = getStaticMethod("unpause", "()V");
 }
 
 GeckoJavaSampler* GeckoJavaSampler::Wrap(jobject obj) {
     JNIEnv *env = GetJNIForThread();
 
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
-        return NULL;
+        return nullptr;
     }
 
     GeckoJavaSampler* ret = new GeckoJavaSampler(obj, env);
     env->DeleteLocalRef(obj);
     return ret;
 }
 
 jstring GeckoJavaSampler::GetFrameNameJavaProfilingWrapper(int32_t a0, int32_t a1, int32_t a2) {
@@ -2620,17 +2620,17 @@ jstring GeckoJavaSampler::GetFrameNameJa
     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);
+        env->PopLocalFrame(nullptr);
         return nullptr;
     }
 
     jstring ret = static_cast<jstring>(env->PopLocalFrame(temp));
     return ret;
 }
 
 jdouble GeckoJavaSampler::GetSampleTimeJavaProfiling(int32_t a0, int32_t a1) {
@@ -2648,21 +2648,21 @@ jdouble GeckoJavaSampler::GetSampleTimeJ
     }
 
     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);
+        env->PopLocalFrame(nullptr);
         return 0.0;
     }
 
-    env->PopLocalFrame(NULL);
+    env->PopLocalFrame(nullptr);
     return temp;
 }
 
 jstring GeckoJavaSampler::GetThreadNameJavaProfilingWrapper(int32_t a0) {
     JNIEnv *env = GetJNIForThread();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return nullptr;
@@ -2676,17 +2676,17 @@ jstring GeckoJavaSampler::GetThreadNameJ
     }
 
     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);
+        env->PopLocalFrame(nullptr);
         return nullptr;
     }
 
     jstring ret = static_cast<jstring>(env->PopLocalFrame(temp));
     return ret;
 }
 
 void GeckoJavaSampler::PauseJavaProfiling() {
@@ -2704,21 +2704,21 @@ void GeckoJavaSampler::PauseJavaProfilin
     }
 
     env->CallStaticVoidMethod(mGeckoJavaSamplerClass, jPauseJavaProfiling);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoJavaSampler::StartJavaProfiling(int32_t a0, int32_t a1) {
     JNIEnv *env = GetJNIForThread();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -2731,21 +2731,21 @@ void GeckoJavaSampler::StartJavaProfilin
     }
 
     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;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoJavaSampler::StopJavaProfiling() {
     JNIEnv *env = GetJNIForThread();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -2758,21 +2758,21 @@ void GeckoJavaSampler::StopJavaProfiling
     }
 
     env->CallStaticVoidMethod(mGeckoJavaSamplerClass, jStopJavaProfiling);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoJavaSampler::UnpauseJavaProfiling() {
     JNIEnv *env = GetJNIForThread();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -2785,21 +2785,21 @@ void GeckoJavaSampler::UnpauseJavaProfil
     }
 
     env->CallStaticVoidMethod(mGeckoJavaSamplerClass, jUnpauseJavaProfiling);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 jclass SurfaceBits::mSurfaceBitsClass = 0;
 jmethodID SurfaceBits::jSurfaceBits = 0;
 jfieldID SurfaceBits::jbuffer = 0;
 jfieldID SurfaceBits::jformat = 0;
 jfieldID SurfaceBits::jheight = 0;
 jfieldID SurfaceBits::jwidth = 0;
 void SurfaceBits::InitStubs(JNIEnv *jEnv) {
@@ -2813,17 +2813,17 @@ void SurfaceBits::InitStubs(JNIEnv *jEnv
     jwidth = getField("width", "I");
 }
 
 SurfaceBits* SurfaceBits::Wrap(jobject obj) {
     JNIEnv *env = GetJNIForThread();
 
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
-        return NULL;
+        return nullptr;
     }
 
     SurfaceBits* ret = new SurfaceBits(obj, env);
     env->DeleteLocalRef(obj);
     return ret;
 }
 
 SurfaceBits::SurfaceBits() {
@@ -2836,17 +2836,17 @@ SurfaceBits::SurfaceBits() {
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         return;
     }
 
     Init(env->NewObject(mSurfaceBitsClass, jSurfaceBits), env);
-    env->PopLocalFrame(NULL);
+    env->PopLocalFrame(nullptr);
 }
 
 jobject SurfaceBits::getbuffer() {
     JNIEnv *env = GetJNIForThread();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return nullptr;
     }
@@ -2932,17 +2932,17 @@ void ThumbnailHelper::InitStubs(JNIEnv *
     jSendThumbnail = getStaticMethod("notifyThumbnail", "(Ljava/nio/ByteBuffer;IZ)V");
 }
 
 ThumbnailHelper* ThumbnailHelper::Wrap(jobject obj) {
     JNIEnv *env = GetJNIForThread();
 
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
-        return NULL;
+        return nullptr;
     }
 
     ThumbnailHelper* ret = new ThumbnailHelper(obj, env);
     env->DeleteLocalRef(obj);
     return ret;
 }
 
 void ThumbnailHelper::SendThumbnail(jobject a0, int32_t a1, bool a2) {
@@ -2965,21 +2965,21 @@ void ThumbnailHelper::SendThumbnail(jobj
     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;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 jclass DisplayPortMetrics::mDisplayPortMetricsClass = 0;
 jmethodID DisplayPortMetrics::jDisplayPortMetrics = 0;
 jfieldID DisplayPortMetrics::jMPosition = 0;
 jfieldID DisplayPortMetrics::jResolution = 0;
 void DisplayPortMetrics::InitStubs(JNIEnv *jEnv) {
     initInit();
 
@@ -2989,17 +2989,17 @@ void DisplayPortMetrics::InitStubs(JNIEn
     jResolution = getField("resolution", "F");
 }
 
 DisplayPortMetrics* DisplayPortMetrics::Wrap(jobject obj) {
     JNIEnv *env = GetJNIForThread();
 
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
-        return NULL;
+        return nullptr;
     }
 
     DisplayPortMetrics* ret = new DisplayPortMetrics(obj, env);
     env->DeleteLocalRef(obj);
     return ret;
 }
 
 DisplayPortMetrics::DisplayPortMetrics(jfloat a0, jfloat a1, jfloat a2, jfloat a3, jfloat a4) {
@@ -3019,17 +3019,17 @@ DisplayPortMetrics::DisplayPortMetrics(j
     jvalue args[5];
     args[0].f = a0;
     args[1].f = a1;
     args[2].f = a2;
     args[3].f = a3;
     args[4].f = a4;
 
     Init(env->NewObjectA(mDisplayPortMetricsClass, jDisplayPortMetrics, args), env);
-    env->PopLocalFrame(NULL);
+    env->PopLocalFrame(nullptr);
 }
 
 jobject DisplayPortMetrics::getMPosition() {
     JNIEnv *env = GetJNIForThread();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return nullptr;
     }
@@ -3055,17 +3055,17 @@ void GLController::InitStubs(JNIEnv *jEn
     jCreateEGLSurfaceForCompositorWrapper = getMethod("createEGLSurfaceForCompositor", "()Ljavax/microedition/khronos/egl/EGLSurface;");
 }
 
 GLController* GLController::Wrap(jobject obj) {
     JNIEnv *env = GetJNIForThread();
 
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
-        return NULL;
+        return nullptr;
     }
 
     GLController* ret = new GLController(obj, env);
     env->DeleteLocalRef(obj);
     return ret;
 }
 
 jobject GLController::CreateEGLSurfaceForCompositorWrapper() {
@@ -3083,17 +3083,17 @@ jobject GLController::CreateEGLSurfaceFo
     }
 
     jobject temp = env->CallObjectMethod(wrapped_obj, jCreateEGLSurfaceForCompositorWrapper);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
         return nullptr;
     }
 
     jobject ret = static_cast<jobject>(env->PopLocalFrame(temp));
     return ret;
 }
 jclass GeckoLayerClient::mGeckoLayerClientClass = 0;
 jmethodID GeckoLayerClient::jActivateProgram = 0;
@@ -3124,17 +3124,17 @@ void GeckoLayerClient::InitStubs(JNIEnv 
     jSyncViewportInfo = getMethod("syncViewportInfo", "(IIIIFZ)Lorg/mozilla/gecko/gfx/ViewTransform;");
 }
 
 GeckoLayerClient* GeckoLayerClient::Wrap(jobject obj) {
     JNIEnv *env = GetJNIForThread();
 
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
-        return NULL;
+        return nullptr;
     }
 
     GeckoLayerClient* ret = new GeckoLayerClient(obj, env);
     env->DeleteLocalRef(obj);
     return ret;
 }
 
 void GeckoLayerClient::ActivateProgram() {
@@ -3152,21 +3152,21 @@ void GeckoLayerClient::ActivateProgram()
     }
 
     env->CallVoidMethod(wrapped_obj, jActivateProgram);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoLayerClient::ContentDocumentChanged() {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -3179,21 +3179,21 @@ void GeckoLayerClient::ContentDocumentCh
     }
 
     env->CallVoidMethod(wrapped_obj, jContentDocumentChanged);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 jobject GeckoLayerClient::CreateFrame() {
     JNIEnv *env = GetJNIForThread();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return nullptr;
     }
@@ -3206,17 +3206,17 @@ jobject GeckoLayerClient::CreateFrame() 
     }
 
     jobject temp = env->CallObjectMethod(wrapped_obj, jCreateFrame);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
         return nullptr;
     }
 
     jobject ret = static_cast<jobject>(env->PopLocalFrame(temp));
     return ret;
 }
 
 void GeckoLayerClient::DeactivateProgram() {
@@ -3234,21 +3234,21 @@ void GeckoLayerClient::DeactivateProgram
     }
 
     env->CallVoidMethod(wrapped_obj, jDeactivateProgram);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 jobject GeckoLayerClient::GetDisplayPort(bool a0, bool a1, int32_t a2, jobject a3) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return nullptr;
     }
@@ -3267,17 +3267,17 @@ jobject GeckoLayerClient::GetDisplayPort
     args[3].l = a3;
 
     jobject temp = env->CallObjectMethodA(wrapped_obj, jGetDisplayPort, args);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
         return nullptr;
     }
 
     jobject ret = static_cast<jobject>(env->PopLocalFrame(temp));
     return ret;
 }
 
 bool GeckoLayerClient::IsContentDocumentDisplayed() {
@@ -3295,21 +3295,21 @@ bool GeckoLayerClient::IsContentDocument
     }
 
     bool temp = env->CallBooleanMethod(wrapped_obj, jIsContentDocumentDisplayed);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
         return false;
     }
 
-    env->PopLocalFrame(NULL);
+    env->PopLocalFrame(nullptr);
     return temp;
 }
 
 jobject GeckoLayerClient::ProgressiveUpdateCallback(bool a0, jfloat a1, jfloat a2, jfloat a3, jfloat a4, jfloat a5, bool a6) {
     JNIEnv *env = GetJNIForThread();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return nullptr;
@@ -3332,17 +3332,17 @@ jobject GeckoLayerClient::ProgressiveUpd
     args[6].z = a6;
 
     jobject temp = env->CallObjectMethodA(wrapped_obj, jProgressiveUpdateCallback, args);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
         return nullptr;
     }
 
     jobject ret = static_cast<jobject>(env->PopLocalFrame(temp));
     return ret;
 }
 
 void GeckoLayerClient::SetFirstPaintViewport(jfloat a0, jfloat a1, jfloat a2, jfloat a3, jfloat a4, jfloat a5, jfloat a6) {
@@ -3369,21 +3369,21 @@ void GeckoLayerClient::SetFirstPaintView
     args[6].f = a6;
 
     env->CallVoidMethodA(wrapped_obj, jSetFirstPaintViewport, args);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void GeckoLayerClient::SetPageRect(jfloat a0, jfloat a1, jfloat a2, jfloat a3) {
     JNIEnv *env = GetJNIForThread();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -3402,21 +3402,21 @@ void GeckoLayerClient::SetPageRect(jfloa
     args[3].f = a3;
 
     env->CallVoidMethodA(wrapped_obj, jSetPageRect, args);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 jobject GeckoLayerClient::SyncFrameMetrics(jfloat a0, jfloat a1, jfloat a2, jfloat a3, jfloat a4, jfloat a5, jfloat a6, bool a7, int32_t a8, int32_t a9, int32_t a10, int32_t a11, jfloat a12, bool a13) {
     JNIEnv *env = GetJNIForThread();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return nullptr;
     }
@@ -3445,17 +3445,17 @@ jobject GeckoLayerClient::SyncFrameMetri
     args[13].z = a13;
 
     jobject temp = env->CallObjectMethodA(wrapped_obj, jSyncFrameMetrics, args);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
         return nullptr;
     }
 
     jobject ret = static_cast<jobject>(env->PopLocalFrame(temp));
     return ret;
 }
 
 jobject GeckoLayerClient::SyncViewportInfo(int32_t a0, int32_t a1, int32_t a2, int32_t a3, jfloat a4, bool a5) {
@@ -3481,17 +3481,17 @@ jobject GeckoLayerClient::SyncViewportIn
     args[5].z = a5;
 
     jobject temp = env->CallObjectMethodA(wrapped_obj, jSyncViewportInfo, args);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
         return nullptr;
     }
 
     jobject ret = static_cast<jobject>(env->PopLocalFrame(temp));
     return ret;
 }
 jclass ImmutableViewportMetrics::mImmutableViewportMetricsClass = 0;
 jmethodID ImmutableViewportMetrics::jImmutableViewportMetrics = 0;
@@ -3502,17 +3502,17 @@ void ImmutableViewportMetrics::InitStubs
     jImmutableViewportMetrics = getMethod("<init>", "(FFFFFFFFFFFFF)V");
 }
 
 ImmutableViewportMetrics* ImmutableViewportMetrics::Wrap(jobject obj) {
     JNIEnv *env = GetJNIForThread();
 
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
-        return NULL;
+        return nullptr;
     }
 
     ImmutableViewportMetrics* ret = new ImmutableViewportMetrics(obj, env);
     env->DeleteLocalRef(obj);
     return ret;
 }
 
 ImmutableViewportMetrics::ImmutableViewportMetrics(jfloat a0, jfloat a1, jfloat a2, jfloat a3, jfloat a4, jfloat a5, jfloat a6, jfloat a7, jfloat a8, jfloat a9, jfloat a10, jfloat a11, jfloat a12) {
@@ -3540,33 +3540,33 @@ ImmutableViewportMetrics::ImmutableViewp
     args[7].f = a7;
     args[8].f = a8;
     args[9].f = a9;
     args[10].f = a10;
     args[11].f = a11;
     args[12].f = a12;
 
     Init(env->NewObjectA(mImmutableViewportMetricsClass, jImmutableViewportMetrics, args), env);
-    env->PopLocalFrame(NULL);
+    env->PopLocalFrame(nullptr);
 }
 jclass LayerView::mLayerViewClass = 0;
 jmethodID LayerView::jRegisterCompositorWrapper = 0;
 void LayerView::InitStubs(JNIEnv *jEnv) {
     initInit();
 
     mLayerViewClass = getClassGlobalRef("org/mozilla/gecko/gfx/LayerView");
     jRegisterCompositorWrapper = getStaticMethod("registerCxxCompositor", "()Lorg/mozilla/gecko/gfx/GLController;");
 }
 
 LayerView* LayerView::Wrap(jobject obj) {
     JNIEnv *env = GetJNIForThread();
 
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
-        return NULL;
+        return nullptr;
     }
 
     LayerView* ret = new LayerView(obj, env);
     env->DeleteLocalRef(obj);
     return ret;
 }
 
 jobject LayerView::RegisterCompositorWrapper() {
@@ -3584,17 +3584,17 @@ jobject LayerView::RegisterCompositorWra
     }
 
     jobject temp = env->CallStaticObjectMethod(mLayerViewClass, jRegisterCompositorWrapper);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
         return nullptr;
     }
 
     jobject ret = static_cast<jobject>(env->PopLocalFrame(temp));
     return ret;
 }
 jclass NativePanZoomController::mNativePanZoomControllerClass = 0;
 jmethodID NativePanZoomController::jPostDelayedCallbackWrapper = 0;
@@ -3607,17 +3607,17 @@ void NativePanZoomController::InitStubs(
     jRequestContentRepaintWrapper = getMethod("requestContentRepaint", "(FFFFF)V");
 }
 
 NativePanZoomController* NativePanZoomController::Wrap(jobject obj) {
     JNIEnv *env = GetJNIForThread();
 
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
-        return NULL;
+        return nullptr;
     }
 
     NativePanZoomController* ret = new NativePanZoomController(obj, env);
     env->DeleteLocalRef(obj);
     return ret;
 }
 
 void NativePanZoomController::PostDelayedCallbackWrapper(int64_t a0) {
@@ -3635,21 +3635,21 @@ void NativePanZoomController::PostDelaye
     }
 
     env->CallVoidMethod(wrapped_obj, jPostDelayedCallbackWrapper, a0);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void NativePanZoomController::RequestContentRepaintWrapper(jfloat a0, jfloat a1, jfloat a2, jfloat a3, jfloat a4) {
     JNIEnv *env = GetJNIForThread();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -3669,21 +3669,21 @@ void NativePanZoomController::RequestCon
     args[4].f = a4;
 
     env->CallVoidMethodA(wrapped_obj, jRequestContentRepaintWrapper, args);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 jclass ProgressiveUpdateData::mProgressiveUpdateDataClass = 0;
 jmethodID ProgressiveUpdateData::jProgressiveUpdateData = 0;
 jmethodID ProgressiveUpdateData::jsetViewport = 0;
 jfieldID ProgressiveUpdateData::jabort = 0;
 jfieldID ProgressiveUpdateData::jheight = 0;
 jfieldID ProgressiveUpdateData::jscale = 0;
 jfieldID ProgressiveUpdateData::jwidth = 0;
@@ -3703,17 +3703,17 @@ void ProgressiveUpdateData::InitStubs(JN
     jy = getField("y", "F");
 }
 
 ProgressiveUpdateData* ProgressiveUpdateData::Wrap(jobject obj) {
     JNIEnv *env = GetJNIForThread();
 
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
-        return NULL;
+        return nullptr;
     }
 
     ProgressiveUpdateData* ret = new ProgressiveUpdateData(obj, env);
     env->DeleteLocalRef(obj);
     return ret;
 }
 
 ProgressiveUpdateData::ProgressiveUpdateData() {
@@ -3726,17 +3726,17 @@ ProgressiveUpdateData::ProgressiveUpdate
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         return;
     }
 
     Init(env->NewObject(mProgressiveUpdateDataClass, jProgressiveUpdateData), env);
-    env->PopLocalFrame(NULL);
+    env->PopLocalFrame(nullptr);
 }
 
 void ProgressiveUpdateData::setViewport(jobject a0) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -3749,21 +3749,21 @@ void ProgressiveUpdateData::setViewport(
     }
 
     env->CallVoidMethod(wrapped_obj, jsetViewport, a0);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 bool ProgressiveUpdateData::getabort() {
     JNIEnv *env = GetJNIForThread();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return false;
     }
@@ -3907,17 +3907,17 @@ void ViewTransform::InitStubs(JNIEnv *jE
     jy = getField("y", "F");
 }
 
 ViewTransform* ViewTransform::Wrap(jobject obj) {
     JNIEnv *env = GetJNIForThread();
 
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
-        return NULL;
+        return nullptr;
     }
 
     ViewTransform* ret = new ViewTransform(obj, env);
     env->DeleteLocalRef(obj);
     return ret;
 }
 
 ViewTransform::ViewTransform(jfloat a0, jfloat a1, jfloat a2) {
@@ -3935,17 +3935,17 @@ ViewTransform::ViewTransform(jfloat a0, 
     }
 
     jvalue args[3];
     args[0].f = a0;
     args[1].f = a1;
     args[2].f = a2;
 
     Init(env->NewObjectA(mViewTransformClass, jViewTransform, args), env);
-    env->PopLocalFrame(NULL);
+    env->PopLocalFrame(nullptr);
 }
 
 jfloat ViewTransform::getfixedLayerMarginBottom() {
     JNIEnv *env = GetJNIForThread();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return 0.0;
     }
@@ -4131,17 +4131,17 @@ void NativeZip::InitStubs(JNIEnv *jEnv) 
     jCreateInputStream = getMethod("createInputStream", "(Ljava/nio/ByteBuffer;I)Ljava/io/InputStream;");
 }
 
 NativeZip* NativeZip::Wrap(jobject obj) {
     JNIEnv *env = GetJNIForThread();
 
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
-        return NULL;
+        return nullptr;
     }
 
     NativeZip* ret = new NativeZip(obj, env);
     env->DeleteLocalRef(obj);
     return ret;
 }
 
 jobject NativeZip::CreateInputStream(jobject a0, int32_t a1) {
@@ -4159,17 +4159,17 @@ jobject NativeZip::CreateInputStream(job
     }
 
     jobject temp = env->CallObjectMethod(wrapped_obj, jCreateInputStream, a0, a1);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
         return nullptr;
     }
 
     jobject ret = static_cast<jobject>(env->PopLocalFrame(temp));
     return ret;
 }
 jclass MatrixBlobCursor::mMatrixBlobCursorClass = 0;
 jmethodID MatrixBlobCursor::jMatrixBlobCursor = 0;
@@ -4188,17 +4188,17 @@ void MatrixBlobCursor::InitStubs(JNIEnv 
     jAddRow2 = getMethod("addRow", "([Ljava/lang/Object;)V");
 }
 
 MatrixBlobCursor* MatrixBlobCursor::Wrap(jobject obj) {
     JNIEnv *env = GetJNIForThread();
 
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
-        return NULL;
+        return nullptr;
     }
 
     MatrixBlobCursor* ret = new MatrixBlobCursor(obj, env);
     env->DeleteLocalRef(obj);
     return ret;
 }
 
 MatrixBlobCursor::MatrixBlobCursor(jobjectArray a0) {
@@ -4211,17 +4211,17 @@ MatrixBlobCursor::MatrixBlobCursor(jobje
     if (env->PushLocalFrame(1) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         return;
     }
 
     Init(env->NewObject(mMatrixBlobCursorClass, jMatrixBlobCursor, a0), env);
-    env->PopLocalFrame(NULL);
+    env->PopLocalFrame(nullptr);
 }
 
 MatrixBlobCursor::MatrixBlobCursor(jobjectArray a0, int32_t a1) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -4229,17 +4229,17 @@ MatrixBlobCursor::MatrixBlobCursor(jobje
     if (env->PushLocalFrame(1) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         return;
     }
 
     Init(env->NewObject(mMatrixBlobCursorClass, jMatrixBlobCursor0, a0, a1), env);
-    env->PopLocalFrame(NULL);
+    env->PopLocalFrame(nullptr);
 }
 
 void MatrixBlobCursor::AddRow(jobject a0) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -4252,21 +4252,21 @@ void MatrixBlobCursor::AddRow(jobject a0
     }
 
     env->CallVoidMethod(wrapped_obj, jAddRow, a0);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void MatrixBlobCursor::AddRow(jobject a0, int32_t a1) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -4279,21 +4279,21 @@ void MatrixBlobCursor::AddRow(jobject a0
     }
 
     env->CallVoidMethod(wrapped_obj, jAddRow1, a0, a1);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void MatrixBlobCursor::AddRow(jobjectArray a0) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -4306,21 +4306,21 @@ void MatrixBlobCursor::AddRow(jobjectArr
     }
 
     env->CallVoidMethod(wrapped_obj, jAddRow2, a0);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 jclass SQLiteBridgeException::mSQLiteBridgeExceptionClass = 0;
 jmethodID SQLiteBridgeException::jSQLiteBridgeException = 0;
 jmethodID SQLiteBridgeException::jSQLiteBridgeException0 = 0;
 jfieldID SQLiteBridgeException::jserialVersionUID = 0;
 void SQLiteBridgeException::InitStubs(JNIEnv *jEnv) {
     initInit();
 
@@ -4330,17 +4330,17 @@ void SQLiteBridgeException::InitStubs(JN
     jserialVersionUID = getStaticField("serialVersionUID", "J");
 }
 
 SQLiteBridgeException* SQLiteBridgeException::Wrap(jobject obj) {
     JNIEnv *env = GetJNIForThread();
 
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
-        return NULL;
+        return nullptr;
     }
 
     SQLiteBridgeException* ret = new SQLiteBridgeException(obj, env);
     env->DeleteLocalRef(obj);
     return ret;
 }
 
 SQLiteBridgeException::SQLiteBridgeException() {
@@ -4353,17 +4353,17 @@ SQLiteBridgeException::SQLiteBridgeExcep
     if (env->PushLocalFrame(0) != 0) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
         return;
     }
 
     Init(env->NewObject(mSQLiteBridgeExceptionClass, jSQLiteBridgeException), env);
-    env->PopLocalFrame(NULL);
+    env->PopLocalFrame(nullptr);
 }
 
 SQLiteBridgeException::SQLiteBridgeException(const nsAString& a0) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
     }
@@ -4373,17 +4373,17 @@ SQLiteBridgeException::SQLiteBridgeExcep
         env->ExceptionDescribe();
         env->ExceptionClear();
         return;
     }
 
     jstring j0 = AndroidBridge::NewJavaString(env, a0);
 
     Init(env->NewObject(mSQLiteBridgeExceptionClass, jSQLiteBridgeException0, j0), env);
-    env->PopLocalFrame(NULL);
+    env->PopLocalFrame(nullptr);
 }
 
 int64_t SQLiteBridgeException::getserialVersionUID() {
     JNIEnv *env = GetJNIForThread();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return 0;
     }
@@ -4405,17 +4405,17 @@ void Clipboard::InitStubs(JNIEnv *jEnv) 
     jSetClipboardText = getStaticMethod("setText", "(Ljava/lang/CharSequence;)V");
 }
 
 Clipboard* Clipboard::Wrap(jobject obj) {
     JNIEnv *env = GetJNIForThread();
 
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
-        return NULL;
+        return nullptr;
     }
 
     Clipboard* ret = new Clipboard(obj, env);
     env->DeleteLocalRef(obj);
     return ret;
 }
 
 void Clipboard::ClearText() {
@@ -4433,21 +4433,21 @@ void Clipboard::ClearText() {
     }
 
     env->CallStaticVoidMethod(mClipboardClass, jClearText);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
-        return;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 jstring Clipboard::GetClipboardTextWrapper() {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return nullptr;
     }
@@ -4460,17 +4460,17 @@ jstring Clipboard::GetClipboardTextWrapp
     }
 
     jobject temp = env->CallStaticObjectMethod(mClipboardClass, jGetClipboardTextWrapper);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
         return nullptr;
     }
 
     jstring ret = static_cast<jstring>(env->PopLocalFrame(temp));
     return ret;
 }
 
 bool Clipboard::HasText() {
@@ -4488,21 +4488,21 @@ bool Clipboard::HasText() {
     }
 
     bool temp = env->CallStaticBooleanMethod(mClipboardClass, jHasText);
 
     if (env->ExceptionCheck()) {
         ALOG_BRIDGE("Exceptional exit of: %s", __PRETTY_FUNCTION__);
         env->ExceptionDescribe();
         env->ExceptionClear();
-        env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
         return false;
     }
 
-    env->PopLocalFrame(NULL);
+    env->PopLocalFrame(nullptr);
     return temp;
 }
 
 void Clipboard::SetClipboardText(const nsAString& a0) {
     JNIEnv *env = AndroidBridge::GetJNIEnv();
     if (!env) {
         ALOG_BRIDGE("Aborted: No env - %s", __PRETTY_FUNCTION__);
         return;
@@ -4518,21 +4518,21 @@ void Clipboard::SetClipboardText(const n
     jstring j0 = AndroidBridge::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;
-    }
-
-    env->PopLocalFrame(NULL);
+        env->PopLocalFrame(nullptr);
+        return;
+    }
+
+    env->PopLocalFrame(nullptr);
 }
 
 void InitStubs(JNIEnv *jEnv) {
     GeckoAppShell::InitStubs(jEnv);
     JavaDomKeyLocation::InitStubs(jEnv);
     GeckoJavaSampler::InitStubs(jEnv);
     SurfaceBits::InitStubs(jEnv);
     ThumbnailHelper::InitStubs(jEnv);