Bug 1843587 - Change getClosedTabData param to default to non-private window object r=sfoster,fxview-reviewers,sessionstore-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D183739
This commit is contained in:
Sarah Clements
2023-07-18 11:11:21 +00:00
parent 39bf8c168a
commit 80033d41ab
2 changed files with 17 additions and 12 deletions

View File

@@ -428,15 +428,18 @@ export var SessionStore = {
/**
* Get the closed tab data associated with all matching windows
* @param {Window} [aWindow] Optional window argument used to determine if we're collecting data for private or non-private windows
* @param {Window} [aWindow] Optional window argument used to determine if we're collecting data for private or non-private windows, will
* default to non-private only due to SessionStoreInternal._getTopWindow(false).
*/
getClosedTabData: function ss_getClosedTabData(aWindow) {
if (!SessionStoreInternal._closedTabsFromAllWindowsEnabled) {
return this.getClosedTabDataForWindow(
aWindow ?? SessionStoreInternal._getTopWindow()
aWindow ?? SessionStoreInternal._getTopWindow(false)
);
}
return SessionStoreInternal.getClosedTabData(aWindow);
return SessionStoreInternal.getClosedTabData(
aWindow ?? SessionStoreInternal._getTopWindow(false)
);
},
/**