Bug 1865891 p11. Rename OnContentViewerEvicted to match nsIDocumentViewer's new name. r=emilio

Depends on D194283

Differential Revision: https://phabricator.services.mozilla.com/D194284
This commit is contained in:
Jonathan Watt 2023-11-22 08:08:16 +00:00
parent d714970784
commit 1fb60aada1
3 changed files with 4 additions and 4 deletions

View file

@ -84,5 +84,5 @@ interface nsISHistoryListener : nsISupports
* *
* @param aNumEvicted - number of content viewers evicted * @param aNumEvicted - number of content viewers evicted
*/ */
void OnContentViewerEvicted(in unsigned long aNumEvicted); void OnDocumentViewerEvicted(in unsigned long aNumEvicted);
}; };

View file

@ -1110,7 +1110,7 @@ nsSHistory::AddSHistoryListener(nsISHistoryListener* aListener) {
void nsSHistory::NotifyListenersContentViewerEvicted(uint32_t aNumEvicted) { void nsSHistory::NotifyListenersContentViewerEvicted(uint32_t aNumEvicted) {
NotifyListeners(mListeners, [aNumEvicted](auto l) { NotifyListeners(mListeners, [aNumEvicted](auto l) {
l->OnContentViewerEvicted(aNumEvicted); l->OnDocumentViewerEvicted(aNumEvicted);
}); });
} }

View file

@ -27,7 +27,7 @@ add_task(async function () {
let { legacySHistory } = webNavigation.sessionHistory; let { legacySHistory } = webNavigation.sessionHistory;
// 3. Register a session history listener to listen for a 'content viewer evicted' event. // 3. Register a session history listener to listen for a 'content viewer evicted' event.
let historyListener = { let historyListener = {
OnContentViewerEvicted() { OnDocumentViewerEvicted() {
ok( ok(
true, true,
"History listener got called after a content viewer was evicted" "History listener got called after a content viewer was evicted"
@ -54,7 +54,7 @@ add_task(async function () {
let shistory = browser.browsingContext.sessionHistory; let shistory = browser.browsingContext.sessionHistory;
// 3. Register a session history listener to listen for a 'content viewer evicted' event. // 3. Register a session history listener to listen for a 'content viewer evicted' event.
let historyListener = { let historyListener = {
OnContentViewerEvicted() { OnDocumentViewerEvicted() {
ok( ok(
true, true,
"History listener got called after a content viewer was evicted" "History listener got called after a content viewer was evicted"