mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 579782 - Deal with a null context when closing the window. r=jst
--HG-- extra : rebase_source : d74e368d3a834fa47b6d912d35f0d9c6a0d60b7b
This commit is contained in:
parent
d91d792e4c
commit
97dcf454d5
@ -2167,7 +2167,9 @@ nsGlobalWindow::SetDocShell(nsIDocShell* aDocShell)
|
||||
mDoc = nsnull;
|
||||
}
|
||||
|
||||
mContext->ClearScope(mJSObject, PR_TRUE);
|
||||
if (mContext) {
|
||||
mContext->ClearScope(mJSObject, PR_TRUE);
|
||||
}
|
||||
|
||||
ClearControllers();
|
||||
|
||||
@ -2181,9 +2183,11 @@ nsGlobalWindow::SetDocShell(nsIDocShell* aDocShell)
|
||||
mArgumentsOrigin = nsnull;
|
||||
}
|
||||
|
||||
mContext->GC();
|
||||
mContext->FinalizeContext();
|
||||
mContext = nsnull;
|
||||
if (mContext) {
|
||||
mContext->GC();
|
||||
mContext->FinalizeContext();
|
||||
mContext = nsnull;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
nsCycleCollector_DEBUG_shouldBeFreed(mContext);
|
||||
|
Loading…
Reference in New Issue
Block a user