зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1683713 - Ensure the restoring tab is not reused in addMultipleTabs; r=dao
Differential Revision: https://phabricator.services.mozilla.com/D100249
This commit is contained in:
Родитель
30ee58f188
Коммит
77da8b6452
|
@ -2878,7 +2878,11 @@
|
|||
|
||||
// Re-use existing selected tab if possible to avoid the overhead of
|
||||
// selecting a new tab.
|
||||
if (select && this.selectedTab.userContextId == userContextId) {
|
||||
if (
|
||||
select &&
|
||||
this.selectedTab.userContextId == userContextId &&
|
||||
!SessionStore.isTabRestoring(this.selectedTab)
|
||||
) {
|
||||
tabWasReused = true;
|
||||
tab = this.selectedTab;
|
||||
if (!tabData.pinned) {
|
||||
|
|
|
@ -298,6 +298,11 @@ var SessionStore = {
|
|||
SessionStoreInternal.setTabState(aTab, aState);
|
||||
},
|
||||
|
||||
// Return whether a tab is restoring.
|
||||
isTabRestoring(aTab) {
|
||||
return TAB_STATE_FOR_BROWSER.has(aTab.linkedBrowser);
|
||||
},
|
||||
|
||||
getInternalObjectState(obj) {
|
||||
return SessionStoreInternal.getInternalObjectState(obj);
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче