Bug 1176019 - Clear cached layers on location change r=mconley

To avoid a flash of stale content in the event of a slow tab
switch, we need to make sure we remove a tab from the cache if
its location changes while it's in the background.

MozReview-Commit-ID: ElpoWhhjb0n

--HG--
extra : rebase_source : 615ebd1a57916e0fe2b8c062ab47ffe748397033
This commit is contained in:
Doug Thayer 2018-05-15 09:29:16 -07:00
parent fc77954257
commit c9a9de8c48

View File

@ -4673,6 +4673,14 @@ class TabProgressListener {
gBrowser._unifiedComplete.registerOpenPage(aLocation, userContextId);
this.mBrowser.registeredOpenURI = aLocation;
}
if (this.mTab != gBrowser.selectedTab) {
let tabCacheIndex = gBrowser._tabLayerCache.indexOf(this.mTab);
if (tabCacheIndex != -1) {
gBrowser._tabLayerCache.splice(tabCacheIndex, 1);
gBrowser._getSwitcher().cleanUpTabAfterEviction(this.mTab);
}
}
}
if (!this.mBlank) {