From c4cbed0a687d22dece072f02a3d3cfbde1e85a70 Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Sat, 20 Oct 2018 19:09:40 -0400 Subject: Remove some additonal Contextual Identity references --- base/content/content.js | 7 +------ base/content/tab-content.js | 27 --------------------------- components/sessionstore/ContentRestore.jsm | 4 ---- components/sessionstore/SessionHistory.jsm | 3 +-- components/sessionstore/TabState.jsm | 4 ---- components/webextensions/ext-tabs.js | 2 -- modules/ContentClick.jsm | 5 ----- 7 files changed, 2 insertions(+), 50 deletions(-) diff --git a/base/content/content.js b/base/content/content.js index c19bd76..e21cedf 100644 --- a/base/content/content.js +++ b/base/content/content.js @@ -162,9 +162,6 @@ var handleContentContextMenu = function (event) { let selectionInfo = BrowserUtils.getSelectionDetails(content); - let loadContext = docShell.QueryInterface(Ci.nsILoadContext); - let userContextId = loadContext.originAttributes.userContextId; - if (Services.appinfo.processType == Services.appinfo.PROCESS_TYPE_CONTENT) { let editFlags = SpellCheckHelper.isEditable(event.target, content); let spellInfo; @@ -188,7 +185,7 @@ var handleContentContextMenu = function (event) { principal, docLocation, charSet, baseURI, referrer, referrerPolicy, contentType, contentDisposition, frameOuterWindowID, selectionInfo, disableSetDesktopBg, - loginFillInfo, parentAllowsMixedContent, userContextId }, + loginFillInfo, parentAllowsMixedContent }, { event, popupNode: event.target }); } else { @@ -211,8 +208,6 @@ var handleContentContextMenu = function (event) { selectionInfo: selectionInfo, disableSetDesktopBackground: disableSetDesktopBg, loginFillInfo, - parentAllowsMixedContent, - userContextId, }; } } diff --git a/base/content/tab-content.js b/base/content/tab-content.js index 6d053dd..5a06c31 100644 --- a/base/content/tab-content.js +++ b/base/content/tab-content.js @@ -889,33 +889,6 @@ var RefreshBlocker = { RefreshBlocker.init(); -var UserContextIdNotifier = { - init() { - addEventListener("DOMWindowCreated", this); - }, - - uninit() { - removeEventListener("DOMWindowCreated", this); - }, - - handleEvent(aEvent) { - // When the window is created, we want to inform the tabbrowser about - // the userContextId in use in order to update the UI correctly. - // Just because we cannot change the userContextId from an active docShell, - // we don't need to check DOMContentLoaded again. - this.uninit(); - - // We use the docShell because content.document can have been loaded before - // setting the originAttributes. - let loadContext = docShell.QueryInterface(Ci.nsILoadContext); - let userContextId = loadContext.originAttributes.userContextId; - - sendAsyncMessage("Browser:WindowCreated", { userContextId }); - } -}; - -UserContextIdNotifier.init(); - #ifdef MOZ_WEBEXTENSIONS ExtensionContent.init(this); addEventListener("unload", () => { diff --git a/components/sessionstore/ContentRestore.jsm b/components/sessionstore/ContentRestore.jsm index d4972bc..8b38676 100644 --- a/components/sessionstore/ContentRestore.jsm +++ b/components/sessionstore/ContentRestore.jsm @@ -208,10 +208,6 @@ ContentRestoreInternal.prototype = { ? Utils.deserializePrincipal(loadArguments.triggeringPrincipal) : null; - if (loadArguments.userContextId) { - webNavigation.setOriginAttributesBeforeLoading({ userContextId: loadArguments.userContextId }); - } - webNavigation.loadURIWithOptions(loadArguments.uri, loadArguments.flags, referrer, referrerPolicy, postData, null, null, triggeringPrincipal); diff --git a/components/sessionstore/SessionHistory.jsm b/components/sessionstore/SessionHistory.jsm index 3d28d87..907a608 100644 --- a/components/sessionstore/SessionHistory.jsm +++ b/components/sessionstore/SessionHistory.jsm @@ -64,11 +64,10 @@ var SessionHistoryInternal = { * The docShell that owns the session history. */ collect: function (docShell) { - let loadContext = docShell.QueryInterface(Ci.nsILoadContext); let webNavigation = docShell.QueryInterface(Ci.nsIWebNavigation); let history = webNavigation.sessionHistory.QueryInterface(Ci.nsISHistoryInternal); - let data = {entries: [], userContextId: loadContext.originAttributes.userContextId }; + let data = {entries: []}; if (history && history.count > 0) { // Loop over the transaction linked list directly so we can get the diff --git a/components/sessionstore/TabState.jsm b/components/sessionstore/TabState.jsm index f22c52f..ac84603 100644 --- a/components/sessionstore/TabState.jsm +++ b/components/sessionstore/TabState.jsm @@ -181,10 +181,6 @@ var TabStateInternal = { if (key === "history") { tabData.entries = value.entries; - if (value.hasOwnProperty("userContextId")) { - tabData.userContextId = value.userContextId; - } - if (value.hasOwnProperty("index")) { tabData.index = value.index; } diff --git a/components/webextensions/ext-tabs.js b/components/webextensions/ext-tabs.js index bb575aa..d46112c 100644 --- a/components/webextensions/ext-tabs.js +++ b/components/webextensions/ext-tabs.js @@ -545,8 +545,6 @@ extensions.registerSchemaAPI("tabs", "addon_parent", context => { if (!containerId) { return Promise.reject({message: `No cookie store exists with ID ${createProperties.cookieStoreId}`}); } - - options.userContextId = containerId; } } diff --git a/modules/ContentClick.jsm b/modules/ContentClick.jsm index 40101d5..4cd665f 100644 --- a/modules/ContentClick.jsm +++ b/modules/ContentClick.jsm @@ -88,11 +88,6 @@ var ContentClick = { triggeringPrincipal: json.triggeringPrincipal, }; - // The new tab/window must use the same userContextId. - if (json.originAttributes.userContextId) { - params.userContextId = json.originAttributes.userContextId; - } - window.openLinkIn(json.href, where, params); } }; -- cgit v1.2.3