mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 738198 - crash in nsPluginInstanceOwner::~nsPluginInstanceOwner r=snorp
This commit is contained in:
parent
35ccf59a89
commit
bb82c56da5
@ -1815,17 +1815,7 @@ void nsPluginInstanceOwner::RemovePluginView()
|
||||
if (!surface)
|
||||
return;
|
||||
|
||||
JNIEnv* env = GetJNIForThread();
|
||||
if (!env)
|
||||
return;
|
||||
|
||||
AndroidBridge::AutoLocalJNIFrame frame(env, 1);
|
||||
|
||||
jclass cls = env->FindClass("org/mozilla/gecko/GeckoAppShell");
|
||||
jmethodID method = env->GetStaticMethodID(cls,
|
||||
"removePluginView",
|
||||
"(Landroid/view/View;)V");
|
||||
env->CallStaticVoidMethod(cls, method, surface);
|
||||
AndroidBridge::RemovePluginView(surface);
|
||||
}
|
||||
|
||||
void nsPluginInstanceOwner::Invalidate() {
|
||||
|
@ -165,6 +165,7 @@ AndroidBridge::Init(JNIEnv *jEnv,
|
||||
jEnableBatteryNotifications = (jmethodID) jEnv->GetStaticMethodID(jGeckoAppShellClass, "enableBatteryNotifications", "()V");
|
||||
jDisableBatteryNotifications = (jmethodID) jEnv->GetStaticMethodID(jGeckoAppShellClass, "disableBatteryNotifications", "()V");
|
||||
jGetCurrentBatteryInformation = (jmethodID) jEnv->GetStaticMethodID(jGeckoAppShellClass, "getCurrentBatteryInformation", "()[D");
|
||||
jRemovePluginView = jEnv->GetStaticMethodID(jGeckoAppShellClass, "removePluginView", "(Landroid/view/View;)V");
|
||||
|
||||
jGetAccessibilityEnabled = (jmethodID) jEnv->GetStaticMethodID(jGeckoAppShellClass, "getAccessibilityEnabled", "()Z");
|
||||
jHandleGeckoMessage = (jmethodID) jEnv->GetStaticMethodID(jGeckoAppShellClass, "handleGeckoMessage", "(Ljava/lang/String;)Ljava/lang/String;");
|
||||
@ -2143,6 +2144,17 @@ NS_IMETHODIMP nsAndroidBridge::SetBrowserApp(nsIAndroidBrowserApp *aBrowserApp)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
AndroidBridge::RemovePluginView(void* surface) {
|
||||
JNIEnv *env = AndroidBridge::GetJNIEnv();
|
||||
if (!env)
|
||||
return;
|
||||
|
||||
AndroidBridge::AutoLocalJNIFrame frame(env, 1);
|
||||
env->CallStaticVoidMethod(sBridge->mGeckoAppShellClass,
|
||||
sBridge->jRemovePluginView, surface);
|
||||
}
|
||||
|
||||
extern "C"
|
||||
__attribute__ ((visibility("default")))
|
||||
jobject JNICALL
|
||||
|
@ -181,6 +181,8 @@ public:
|
||||
|
||||
static void NotifyIMEChange(const PRUnichar *aText, PRUint32 aTextLen, int aStart, int aEnd, int aNewEnd);
|
||||
|
||||
static void RemovePluginView(void* surface);
|
||||
|
||||
nsresult TakeScreenshot(nsIDOMWindow *window, PRInt32 srcX, PRInt32 srcY, PRInt32 srcW, PRInt32 srcH, PRInt32 dstW, PRInt32 dstH, PRInt32 tabId, float scale);
|
||||
|
||||
void AcknowledgeEventSync();
|
||||
@ -526,6 +528,7 @@ protected:
|
||||
jmethodID jCheckUriVisited;
|
||||
jmethodID jMarkUriVisited;
|
||||
jmethodID jEmitGeckoAccessibilityEvent;
|
||||
jmethodID jRemovePluginView;
|
||||
|
||||
jmethodID jNumberOfMessages;
|
||||
jmethodID jSendMessage;
|
||||
|
Loading…
Reference in New Issue
Block a user