Bug 1271607 - Pinned tabs should not restore as non-remote. r?mikedeboer
App tabs load immediately, and so there's no point in causing the remoteness
flipping machinery to kick off by making the pinned tabs non-remote by default.
MozReview-Commit-ID: 48O2mJSHurr
--- a/browser/components/sessionstore/SessionStore.jsm
+++ b/browser/components/sessionstore/SessionStore.jsm
@@ -2928,20 +2928,24 @@ var SessionStoreInternal = {
let numVisibleTabs = 0;
for (var t = 0; t < newTabCount; t++) {
// When trying to restore into existing tab, we also take the userContextId
// into account if present.
let userContextId = winData.tabs[t].userContextId;
let reuseExisting = t < openTabCount &&
(tabbrowser.tabs[t].getAttribute("usercontextid") == (userContextId || ""));
+ // If the tab is pinned, then we'll be loading it right away, and
+ // there's no need to cause a remoteness flip by loading it initially
+ // non-remote.
+ let forceNotRemote = !winData.tabs[t].pinned;
let tab = reuseExisting ? tabbrowser.tabs[t] :
tabbrowser.addTab("about:blank",
{skipAnimation: true,
- forceNotRemote: true,
+ forceNotRemote,
userContextId});
// If we inserted a new tab because the userContextId didn't match with the
// open tab, even though `t < openTabCount`, we need to remove that open tab
// and put the newly added tab in its place.
if (!reuseExisting && t < openTabCount) {
tabbrowser.removeTab(tabbrowser.tabs[t]);
tabbrowser.moveTabTo(tab, t);