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);
|
gNumberOfDocShells, mHistoryID);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (mInPrivateBrowsing) {
|
|
||||||
DecreasePrivateDocShellCount();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
@@ -4915,6 +4911,12 @@ nsDocShell::Destroy()
|
|||||||
// Cancel any timers that were set for this docshell; this is needed
|
// Cancel any timers that were set for this docshell; this is needed
|
||||||
// to break the cycle between us and the timers.
|
// to break the cycle between us and the timers.
|
||||||
CancelRefreshURITimers();
|
CancelRefreshURITimers();
|
||||||
|
|
||||||
|
if (mInPrivateBrowsing) {
|
||||||
|
mInPrivateBrowsing = false;
|
||||||
|
DecreasePrivateDocShellCount();
|
||||||
|
}
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user