mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 904835 - Don't stomp on the new plugin's prototype if we load a plugin nested inside unloading a plugin. r=josh
This commit is contained in:
parent
1383b35b3b
commit
e650d63ad1
@ -2399,6 +2399,14 @@ nsObjectLoadingContent::UnloadObject(bool aResetState)
|
|||||||
|
|
||||||
mScriptRequested = false;
|
mScriptRequested = false;
|
||||||
|
|
||||||
|
if (!mInstanceOwner) {
|
||||||
|
// The protochain is normally thrown out after a plugin stops, but if we
|
||||||
|
// re-enter while stopping a plugin and try to load something new, we need
|
||||||
|
// to throw away the old protochain in the nested unload.
|
||||||
|
TeardownProtoChain();
|
||||||
|
mIsStopping = false;
|
||||||
|
}
|
||||||
|
|
||||||
// This call should be last as it may re-enter
|
// This call should be last as it may re-enter
|
||||||
StopPluginInstance();
|
StopPluginInstance();
|
||||||
}
|
}
|
||||||
@ -2786,9 +2794,17 @@ nsObjectLoadingContent::DoStopPlugin(nsPluginInstanceOwner* aInstanceOwner,
|
|||||||
NS_ASSERTION(pluginHost, "No plugin host?");
|
NS_ASSERTION(pluginHost, "No plugin host?");
|
||||||
pluginHost->StopPluginInstance(inst);
|
pluginHost->StopPluginInstance(inst);
|
||||||
}
|
}
|
||||||
TeardownProtoChain();
|
|
||||||
aInstanceOwner->Destroy();
|
aInstanceOwner->Destroy();
|
||||||
|
|
||||||
|
// If we re-enter in plugin teardown UnloadObject will tear down the
|
||||||
|
// protochain -- the current protochain could be from a new, unrelated, load.
|
||||||
|
if (!mIsStopping) {
|
||||||
|
LOG(("OBJLC [%p]: Re-entered in plugin teardown", this));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
TeardownProtoChain();
|
||||||
mIsStopping = false;
|
mIsStopping = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user