Bug 400735: Hold strong reference while calling UnblockOnload. r=smaug sr=jst a=beltzner

This commit is contained in:
jonas@sicking.cc 2007-10-29 19:14:52 -07:00
parent 7e7bb50612
commit ef00ebb9f1

View File

@ -915,7 +915,10 @@ nsBindingManager::DoProcessAttachedQueue()
mProcessAttachedQueueEvent = nsnull;
if (mDocument) {
mDocument->UnblockOnload(PR_TRUE);
// Hold a strong reference while calling UnblockOnload since that might
// run script.
nsCOMPtr<nsIDocument> doc = mDocument;
doc->UnblockOnload(PR_TRUE);
}
}