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:
Jonathan Watt 2023-11-22 08:08:12 +00:00
parent 1288156d4b
commit 64e95d278d
7 changed files with 10 additions and 10 deletions

View File

@ -237,7 +237,7 @@ void ChildSHistory::RemovePendingHistoryNavigations() {
void ChildSHistory::EvictLocalContentViewers() {
if (!mozilla::SessionHistoryInParent()) {
mHistory->EvictAllContentViewers();
mHistory->EvictAllDocumentViewers();
}
}

View File

@ -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

View File

@ -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++) {

View File

@ -6,7 +6,7 @@
<script>
// Evict bfcache and then go back.
async function evictCache() {
await SpecialPowers.evictAllContentViewers();
await SpecialPowers.evictAllDocumentViewers();
history.back();
}

View File

@ -1329,7 +1329,7 @@ nsresult nsFrameLoader::SwapWithOtherRemoteLoader(
aFrameLoader->GetMaybePendingBrowsingContext()) {
nsCOMPtr<nsISHistory> shistory = bc->Canonical()->GetSessionHistory();
if (shistory) {
shistory->EvictAllContentViewers();
shistory->EvictAllDocumentViewers();
}
}
};

View File

@ -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();
}
}

View File

@ -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":