mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-02 12:07:52 +00:00
hold an extra ref on mContext while we are calling GC. a=leaf to checkin while tree is closed
This commit is contained in:
parent
89f8378252
commit
7d198d2117
@ -253,7 +253,11 @@ NS_IMETHODIMP GlobalWindowImpl::SetNewDocument(nsIDOMDocument *aDocument)
|
||||
mDocument = nsnull; // Forces Release
|
||||
|
||||
if(mContext)
|
||||
mContext->GC();
|
||||
{
|
||||
// Add an extra ref in case we release mContext during GC.
|
||||
nsCOMPtr<nsIScriptContext> kungFuDeathGrip = mContext;
|
||||
kungFuDeathGrip->GC();
|
||||
}
|
||||
|
||||
mDocument = aDocument;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user