hold an extra ref on mContext while we are calling GC. a=leaf to checkin while tree is closed
git-svn-id: svn://10.0.0.236/trunk@64824 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
5071419800
commit
cb6bfbdb6e
@ -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