mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 05:48:26 +00:00
Bug 1310766 - Part 1: Close inactive frameloaders when destroying frameloader rather than when closing tab, r=ehsan
MozReview-Commit-ID: FHKRe9dFDYt --HG-- extra : rebase_source : 7e8748198b96085a1f3e9561ae6bc1d51271f6ff
This commit is contained in:
parent
714e747215
commit
79e5a00cd7
@ -2527,13 +2527,6 @@
|
||||
|
||||
var browser = this.getBrowserForTab(aTab);
|
||||
|
||||
// Start closing the FrameLoaderOwners which are inactive, so that
|
||||
// they are cleaned up as well.
|
||||
let frameLoader = browser.frameLoader;
|
||||
if (frameLoader && frameLoader.groupedSessionHistory) {
|
||||
frameLoader.groupedSessionHistory.closeInactiveFrameLoaderOwners();
|
||||
}
|
||||
|
||||
if (!aTab._pendingPermitUnload && !aAdoptedByTab && !aSkipPermitUnload) {
|
||||
// We need to block while calling permitUnload() because it
|
||||
// processes the event queue and may lead to another removeTab()
|
||||
|
@ -1988,6 +1988,11 @@ nsFrameLoader::StartDestroy()
|
||||
}
|
||||
}
|
||||
|
||||
// Destroy the other frame loader owners now that we are being destroyed.
|
||||
if (mGroupedSessionHistory) {
|
||||
mGroupedSessionHistory->CloseInactiveFrameLoaderOwners();
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIRunnable> destroyRunnable = new nsFrameLoaderDestroyRunnable(this);
|
||||
if (mNeedsAsyncDestroy || !doc ||
|
||||
NS_FAILED(doc->FinalizeFrameLoader(this, destroyRunnable))) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user