Bug 804653 - Make destroying a private docshell update the global count of private docshells instead of waiting an indefinite amount of time for the destructor. r=bz

This commit is contained in:
Josh Matthews
2012-10-30 09:21:52 -04:00
parent b003e89213
commit dd3c64d914

View File

@@ -825,10 +825,6 @@ nsDocShell::~nsDocShell()
gNumberOfDocShells, mHistoryID);
}
#endif
if (mInPrivateBrowsing) {
DecreasePrivateDocShellCount();
}
}
nsresult
@@ -4915,6 +4911,12 @@ nsDocShell::Destroy()
// Cancel any timers that were set for this docshell; this is needed
// to break the cycle between us and the timers.
CancelRefreshURITimers();
if (mInPrivateBrowsing) {
mInPrivateBrowsing = false;
DecreasePrivateDocShellCount();
}
return NS_OK;
}