Bug 794981 - Part 2: Don't pass GeckoAppShell class to Init as a parameter - find it in the usual way. r=kats
This commit is contained in:
@@ -61,8 +61,7 @@ class AndroidRefable {
|
||||
static android::sp<AndroidRefable> (*android_SurfaceTexture_getNativeWindow)(JNIEnv* env, jobject surfaceTexture) = nullptr;
|
||||
|
||||
void
|
||||
AndroidBridge::ConstructBridge(JNIEnv *jEnv,
|
||||
jclass jGeckoAppShellClass)
|
||||
AndroidBridge::ConstructBridge(JNIEnv *jEnv)
|
||||
{
|
||||
/* NSS hack -- bionic doesn't handle recursive unloads correctly,
|
||||
* because library finalizer functions are called with the dynamic
|
||||
@@ -75,15 +74,14 @@ AndroidBridge::ConstructBridge(JNIEnv *jEnv,
|
||||
PR_NewThreadPrivateIndex(&sJavaEnvThreadIndex, JavaThreadDetachFunc);
|
||||
|
||||
AndroidBridge *bridge = new AndroidBridge();
|
||||
if (!bridge->Init(jEnv, jGeckoAppShellClass)) {
|
||||
if (!bridge->Init(jEnv)) {
|
||||
delete bridge;
|
||||
}
|
||||
sBridge = bridge;
|
||||
}
|
||||
|
||||
bool
|
||||
AndroidBridge::Init(JNIEnv *jEnv,
|
||||
jclass jGeckoAppShellClass)
|
||||
AndroidBridge::Init(JNIEnv *jEnv)
|
||||
{
|
||||
ALOG_BRIDGE("AndroidBridge::Init");
|
||||
jEnv->GetJavaVM(&mJavaVM);
|
||||
@@ -98,6 +96,8 @@ AndroidBridge::Init(JNIEnv *jEnv,
|
||||
mHasNativeWindowAccess = false;
|
||||
mHasNativeWindowFallback = false;
|
||||
|
||||
jclass jGeckoAppShellClass = jEnv->FindClass("org/mozilla/gecko/GeckoAppShell");
|
||||
|
||||
mGeckoAppShellClass = (jclass) jEnv->NewGlobalRef(jGeckoAppShellClass);
|
||||
|
||||
#ifdef MOZ_WEBSMS_BACKEND
|
||||
|
||||
Reference in New Issue
Block a user