mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 23:02:20 +00:00
Bug 1865891 p2. Rename EvictAllContentViewers to match nsIDocumentViewer's new name. r=emilio
Depends on D194274 Differential Revision: https://phabricator.services.mozilla.com/D194275
This commit is contained in:
parent
1288156d4b
commit
64e95d278d
@ -237,7 +237,7 @@ void ChildSHistory::RemovePendingHistoryNavigations() {
|
||||
|
||||
void ChildSHistory::EvictLocalContentViewers() {
|
||||
if (!mozilla::SessionHistoryInParent()) {
|
||||
mHistory->EvictAllContentViewers();
|
||||
mHistory->EvictAllDocumentViewers();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -209,7 +209,7 @@ interface nsISHistory: nsISupports
|
||||
/**
|
||||
* Evict all the content viewers in this session history
|
||||
*/
|
||||
void evictAllContentViewers();
|
||||
void evictAllDocumentViewers();
|
||||
|
||||
/**
|
||||
* Add a BFCache entry to expiration tracker so it gets evicted on
|
||||
|
@ -1208,7 +1208,7 @@ nsSHistory::EvictContentViewersOrReplaceEntry(nsISHEntry* aNewSHEntry,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSHistory::EvictAllContentViewers() {
|
||||
nsSHistory::EvictAllDocumentViewers() {
|
||||
// XXXbz we don't actually do a good job of evicting things as we should, so
|
||||
// we might have viewers quite far from mIndex. So just evict everything.
|
||||
for (int32_t i = 0; i < Length(); i++) {
|
||||
|
@ -6,7 +6,7 @@
|
||||
<script>
|
||||
// Evict bfcache and then go back.
|
||||
async function evictCache() {
|
||||
await SpecialPowers.evictAllContentViewers();
|
||||
await SpecialPowers.evictAllDocumentViewers();
|
||||
|
||||
history.back();
|
||||
}
|
||||
|
@ -1329,7 +1329,7 @@ nsresult nsFrameLoader::SwapWithOtherRemoteLoader(
|
||||
aFrameLoader->GetMaybePendingBrowsingContext()) {
|
||||
nsCOMPtr<nsISHistory> shistory = bc->Canonical()->GetSessionHistory();
|
||||
if (shistory) {
|
||||
shistory->EvictAllContentViewers();
|
||||
shistory->EvictAllDocumentViewers();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -1676,11 +1676,11 @@ export class SpecialPowersChild extends JSWindowActorChild {
|
||||
this._xpcshellScope = val;
|
||||
}
|
||||
|
||||
async evictAllContentViewers() {
|
||||
async evictAllDocumentViewers() {
|
||||
if (Services.appinfo.sessionHistoryInParent) {
|
||||
await this.sendQuery("EvictAllContentViewers");
|
||||
await this.sendQuery("EvictAllDocumentViewers");
|
||||
} else {
|
||||
this.browsingContext.top.childSessionHistory.legacySHistory.evictAllContentViewers();
|
||||
this.browsingContext.top.childSessionHistory.legacySHistory.evictAllDocumentViewers();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -949,8 +949,8 @@ export class SpecialPowersParent extends JSWindowActorParent {
|
||||
case "Wakeup":
|
||||
return undefined;
|
||||
|
||||
case "EvictAllContentViewers":
|
||||
this.browsingContext.top.sessionHistory.evictAllContentViewers();
|
||||
case "EvictAllDocumentViewers":
|
||||
this.browsingContext.top.sessionHistory.evictAllDocumentViewers();
|
||||
return undefined;
|
||||
|
||||
case "getBaselinePrefs":
|
||||
|
Loading…
Reference in New Issue
Block a user