mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1250871 - only send messages to child scripts when the docShell is still around. r=smaug
This commit is contained in:
parent
faddffed3f
commit
ba2ab36261
@ -65,11 +65,6 @@ SocialErrorListener = {
|
||||
},
|
||||
|
||||
receiveMessage(message) {
|
||||
if (!content) {
|
||||
Cu.reportError("Message received whilst `content` is null: " + message.name);
|
||||
return;
|
||||
}
|
||||
|
||||
let document = content.document;
|
||||
|
||||
switch (message.name) {
|
||||
|
@ -2466,7 +2466,9 @@ public:
|
||||
{
|
||||
nsInProcessTabChildGlobal* tabChild =
|
||||
static_cast<nsInProcessTabChildGlobal*>(mFrameLoader->mChildMessageManager.get());
|
||||
if (tabChild && tabChild->GetInnerManager()) {
|
||||
// Since bug 1126089, messages can arrive even when the docShell is destroyed.
|
||||
// Here we make sure that those messages are not delivered.
|
||||
if (tabChild && tabChild->GetInnerManager() && mFrameLoader->GetExistingDocShell()) {
|
||||
nsCOMPtr<nsIXPConnectJSObjectHolder> kungFuDeathGrip(tabChild->GetGlobal());
|
||||
ReceiveMessage(static_cast<EventTarget*>(tabChild), mFrameLoader,
|
||||
tabChild->GetInnerManager());
|
||||
|
Loading…
Reference in New Issue
Block a user