Bug 1415333 - Use tab.setAttribute instead of tab.setUserContextId r=Gijs
authorRob Wu <rob@robwu.nl>
Wed, 05 Sep 2018 09:53:17 +0000
changeset 483091 244f34cffbc1a4a3d46b7d17d92814296699f328
parent 483090 08a3433e191deee387705b14d4a32df117bb1f46
child 483092 4a1a4fda680772041e9c45daa6458fedc4d76fe8
push id232
push userfmarier@mozilla.com
push dateWed, 05 Sep 2018 20:45:54 +0000
reviewersGijs
bugs1415333
milestone64.0a1
Bug 1415333 - Use tab.setAttribute instead of tab.setUserContextId r=Gijs Use tab.setAttribute instead of tab.setUserContextId, in case the XBL bindings are not ready yet. Differential Revision: https://phabricator.services.mozilla.com/D5013
browser/base/content/tabbrowser.js
--- a/browser/base/content/tabbrowser.js
+++ b/browser/base/content/tabbrowser.js
@@ -304,17 +304,17 @@ window._gBrowser = {
     this._selectedTab = tab;
     this._selectedBrowser = browser;
     tab.permanentKey = browser.permanentKey;
     tab._tPos = 0;
     tab._fullyOpen = true;
     tab.linkedBrowser = browser;
 
     if (userContextId) {
-      tab.setUserContextId(userContextId);
+      tab.setAttribute("usercontextid", userContextId);
       ContextualIdentityService.setTabStyle(tab);
     }
 
     this._tabForBrowser.set(browser, tab);
 
     this._appendStatusPanel();
 
     this.initialBrowser = browser;