Bug 336978, Crash when window gets destroyed on pagehide event, r+sr=bryner

git-svn-id: svn://10.0.0.236/trunk@198348 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
Olli.Pettay%helsinki.fi
2006-05-24 20:31:59 +00:00
parent 3db1b94744
commit b80a1908db
2 changed files with 6 additions and 0 deletions

View File

@@ -921,6 +921,9 @@ NS_IMETHODIMP
nsDocShell::FirePageHideNotification(PRBool aIsUnload)
{
if (mContentViewer && !mFiredUnloadEvent) {
// Keep an explicit reference since calling PageHide could release
// mContentViewer
nsCOMPtr<nsIContentViewer> kungFuDeathGrip(mContentViewer);
mFiredUnloadEvent = PR_TRUE;
mContentViewer->PageHide(aIsUnload);