mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 22:05:44 +00:00
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:
parent
fc77954257
commit
c9a9de8c48
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user