added deathgrip to survive window destruction during onload handler. part of fix for bug 19302. r:hyatt a:chofmann

git-svn-id: svn://10.0.0.236/trunk@56015 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
danm%netscape.com
1999-12-15 02:18:52 +00:00
parent ba5552a03c
commit 7fc2e6b04a
4 changed files with 20 additions and 0 deletions

View File

@@ -3014,6 +3014,11 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader,
rv = channel->GetURI(getter_AddRefs(aURL));
if (NS_FAILED(rv)) return rv;
/* one of many safeguards that prevent death and destruction if
someone is so very very rude as to bring this window down
during this load handler. */
nsCOMPtr<nsIWebShell> kungFuDeathGrip(this);
//if (!mProcessedEndDocumentLoad) {
if (loader == mDocLoader) {
mProcessedEndDocumentLoad = PR_TRUE;