Bug 1532498 - Check userContextId when consuming preopened tabs r=Gijs
authorDoug Thayer <dothayer@mozilla.com>
Wed, 06 Mar 2019 11:50:15 +0000
changeset 520461 764939fcdaf3bc4796882229e372f659e6ead276
parent 520460 4d823462e5bd632f0e04cc8bf63ef495e52d4602
child 520462 447f88307c1c9463a748b6354f238774b12c649c
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1532498
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1532498 - Check userContextId when consuming preopened tabs r=Gijs This will fix the behavior, I think it might still be worth deliberating over whether we want to consider non-default userContextId's when tracking the number of pinned tabs or not. This will be visually correct - the number of pinned tabs won't change, so things won't be moving around in the tab bar, but we will throw away the preopened tab once we get further down in SessionStore.jsm, which is less than ideal. Differential Revision: https://phabricator.services.mozilla.com/D22195
browser/components/sessionstore/SessionStore.jsm
--- a/browser/components/sessionstore/SessionStore.jsm
+++ b/browser/components/sessionstore/SessionStore.jsm
@@ -3719,17 +3719,18 @@ var SessionStoreInternal = {
 
         tabbrowser.moveTabToEnd();
         if (aWindow.gMultiProcessBrowser && !tab.linkedBrowser.isRemoteBrowser) {
           tabbrowser.updateBrowserRemoteness(tab.linkedBrowser, true);
         }
       } else if (tabData.pinned &&
           tabbrowser.tabs[t] &&
           tabbrowser.tabs[t].pinned &&
-          !tabbrowser.tabs[t].linkedPanel) {
+          !tabbrowser.tabs[t].linkedPanel &&
+          tabbrowser.tabs[t].userContextId == userContextId) {
         tab = tabbrowser.tabs[t];
         tabbrowser.activatePreopenedPinnedTab(tab);
       }
 
       // Add a new tab if needed.
       if (!tab) {
         let createLazyBrowser = restoreTabsLazily && !select && !tabData.pinned;