mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 23:35:34 +00:00
Bug 1271792 - Set correct usercontextid before swapping tabs. r=baku
MozReview-Commit-ID: DOOTo9IhP2E --HG-- extra : rebase_source : c36de944bb2157bb8fd56e5672f3074554421d1a
This commit is contained in:
parent
ebe3c8320b
commit
f099b439ef
@ -1107,6 +1107,12 @@ var gBrowserInit = {
|
||||
"without the remote tabs load context.");
|
||||
}
|
||||
|
||||
// We must set usercontextid before updateBrowserRemoteness()
|
||||
// so that the newly created remote tab child has correct usercontextid
|
||||
if (tabToOpen.hasAttribute("usercontextid")) {
|
||||
let usercontextid = tabToOpen.getAttribute("usercontextid");
|
||||
gBrowser.selectedBrowser.setAttribute("usercontextid", usercontextid);
|
||||
}
|
||||
gBrowser.updateBrowserRemoteness(gBrowser.selectedBrowser, true);
|
||||
}
|
||||
gBrowser.swapBrowsersAndCloseOther(gBrowser.selectedTab, tabToOpen);
|
||||
|
@ -3073,7 +3073,12 @@
|
||||
// Swap the dropped tab with a new one we create and then close
|
||||
// it in the other window (making it seem to have moved between
|
||||
// windows).
|
||||
let newTab = this.addTab("about:blank", { eventDetail: { adoptedTab: aTab } });
|
||||
let params = { eventDetail: { adoptedTab: aTab } };
|
||||
if (aTab.hasAttribute("usercontextid")) {
|
||||
// new tab must have the same usercontextid as the old one
|
||||
params.userContextId = aTab.getAttribute("usercontextid");
|
||||
}
|
||||
let newTab = this.addTab("about:blank", params);
|
||||
let newBrowser = this.getBrowserForTab(newTab);
|
||||
let newURL = aTab.linkedBrowser.currentURI.spec;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user