Bug 1192082 - Iniialize/deinitialize JNI in nsAppShell; r=snorp

First we need to set the Gecko thread JNIEnv* in nsAndroidStartup, but
after that we can initialize and deinitialize the rest of JNI, including
AndroidBridge, in GeckoAppShell. This makes nsAppShell control the
AndroidBridge lifetime. Over time, parts of the AndroidBridge
functionality will be migrated to nsAppShell.
This commit is contained in:
Jim Chen
2015-08-13 00:53:40 -04:00
parent 3f6082f711
commit adaa3af91b
7 changed files with 47 additions and 7 deletions

View File

@@ -47,8 +47,6 @@
#include "SurfaceTexture.h"
#include "GLContextProvider.h"
#include "ANRReporter.h"
using namespace mozilla;
using namespace mozilla::gfx;
using namespace mozilla::jni;
@@ -260,7 +258,6 @@ AndroidBridge::AndroidBridge()
jAvailable = inputStream.getMethod("available", "()I");
InitAndroidJavaWrappers(jEnv);
ANRReporter::Init();
}
// Raw JNIEnv variants.