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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user