Don't run JS GC when creating a new window. b=42321 r,sr = jst,brendan

This commit is contained in:
dbaron%fas.harvard.edu 2001-05-18 23:11:53 +00:00
parent 81fb2b8290
commit a29fe8e589

View File

@ -392,7 +392,7 @@ NS_IMETHODIMP GlobalWindowImpl::SetNewDocument(nsIDOMDocument* aDocument)
mDocument = nsnull; // Forces Release
}
if (mContext && aDocument) {
if (mContext && aDocument && mDocument) {
// Add an extra ref in case we release mContext during GC.
nsCOMPtr<nsIScriptContext> kungFuDeathGrip = mContext;
kungFuDeathGrip->GC();