Backed out 4 changesets (bug 1521808) for build bustage. CLOSED TREE
authorDorel Luca <dluca@mozilla.com>
Tue, 12 Feb 2019 14:54:45 +0200
changeset 458674 a791ece512e14ccdc7ebf95e1f28d49e80d372f5
parent 458673 80aeea5f7abe0a5c98c5c2f8c9de7d152c2a82e2
child 458675 a273edea702d8bdfc7a5152160fac49a17902671
push id35543
push userccoroiu@mozilla.com
push dateTue, 12 Feb 2019 16:27:27 +0000
treeherdermozilla-central@4ad4e42bcb99 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1521808
milestone67.0a1
backs out80aeea5f7abe0a5c98c5c2f8c9de7d152c2a82e2
c8c151d92c036ce95b5deb097e95e5aab9ab34fc
cc0a5c7dabb45dcdfd2a2b723c950cb7f1baf322
8d5174a560fac56a1a6046cba5ebe95df62836a3
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
Backed out 4 changesets (bug 1521808) for build bustage. CLOSED TREE Backed out changeset 80aeea5f7abe (bug 1521808) Backed out changeset c8c151d92c03 (bug 1521808) Backed out changeset cc0a5c7dabb4 (bug 1521808) Backed out changeset 8d5174a560fa (bug 1521808)
browser/components/sessionstore/SessionStore.jsm
docshell/base/nsDocShell.cpp
dom/base/ThirdPartyUtil.cpp
ipc/glue/BackgroundUtils.cpp
netwerk/base/LoadInfo.cpp
netwerk/base/LoadInfo.h
netwerk/base/mozIThirdPartyUtil.idl
netwerk/base/nsILoadInfo.idl
netwerk/ipc/NeckoChannelParams.ipdlh
netwerk/ipc/NeckoMessageUtils.h
netwerk/protocol/http/HttpBaseChannel.cpp
netwerk/protocol/http/HttpBaseChannel.h
netwerk/protocol/http/HttpChannelChild.cpp
netwerk/protocol/http/HttpChannelParent.cpp
netwerk/protocol/http/HttpChannelParent.h
netwerk/protocol/http/NullHttpChannel.cpp
netwerk/protocol/http/TrackingDummyChannel.cpp
netwerk/protocol/http/nsHttpAtomList.h
netwerk/protocol/http/nsHttpChannel.cpp
netwerk/protocol/http/nsHttpChannel.h
netwerk/protocol/http/nsIHttpChannel.idl
netwerk/protocol/http/nsIHttpChannelInternal.idl
netwerk/protocol/viewsource/nsViewSourceChannel.cpp
netwerk/test/unit/test_crossOriginOpenerPolicy.js
netwerk/test/unit/xpcshell.ini
netwerk/test/unit_ipc/test_crossOriginOpenerPolicy_wrap.js
netwerk/test/unit_ipc/xpcshell.ini
toolkit/components/remotebrowserutils/tests/browser/browser.ini
toolkit/components/remotebrowserutils/tests/browser/browser_httpCrossOriginOpenerPolicy.js
toolkit/components/remotebrowserutils/tests/browser/coop_header.sjs
toolkit/modules/E10SUtils.jsm
--- a/browser/components/sessionstore/SessionStore.jsm
+++ b/browser/components/sessionstore/SessionStore.jsm
@@ -2310,18 +2310,17 @@ var SessionStoreInternal = {
 
     // Tell our caller to redirect the load into this newly created process.
     return aBrowser.frameLoader.tabParent;
   },
 
   // Examine the channel response to see if we should change the process
   // performing the given load.
   onExamineResponse(aChannel) {
-    if (!E10SUtils.useHttpResponseProcessSelection() &&
-        !E10SUtils.useCrossOriginOpenerPolicy()) {
+    if (!E10SUtils.useHttpResponseProcessSelection()) {
       return;
     }
 
     if (!aChannel.isDocument || !aChannel.loadInfo) {
       return; // Not a document load.
     }
 
     let browsingContext = aChannel.loadInfo.browsingContext;
@@ -2360,19 +2359,17 @@ var SessionStoreInternal = {
 
     let resultPrincipal =
       Services.scriptSecurityManager.getChannelResultPrincipal(aChannel);
     let useRemoteTabs = browser.ownerGlobal.gMultiProcessBrowser;
     let remoteType = E10SUtils.getRemoteTypeForPrincipal(resultPrincipal,
                                                          useRemoteTabs,
                                                          browser.remoteType,
                                                          currentPrincipal);
-    if (browser.remoteType == remoteType &&
-        (!E10SUtils.useCrossOriginOpenerPolicy() ||
-         !aChannel.hasCrossOriginOpenerPolicyMismatch())) {
+    if (browser.remoteType == remoteType) {
       return; // Already in compatible process.
     }
 
     // ------------------------------------------------------------------------
     // DANGER ZONE: Perform a process switch into the new process. This is
     // destructive.
     // ------------------------------------------------------------------------
     let identifier = ++this._switchIdMonotonic;
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -9849,22 +9849,16 @@ nsresult nsDocShell::DoURILoad(nsDocShel
 
   // We have to do this in case our OriginAttributes are different from the
   // OriginAttributes of the parent document. Or in case there isn't a
   // parent document.
   bool isTopLevelDoc = mItemType == typeContent &&
                        (contentPolicyType == nsIContentPolicy::TYPE_DOCUMENT ||
                         GetIsMozBrowser());
 
-  if (isTopLevelDoc && GetDocument() && GetDocument()->GetChannel()) {
-    nsCOMPtr<nsILoadInfo> oldLoadInfo =
-        GetDocument()->GetChannel()->GetLoadInfo();
-    loadInfo->SetOpenerPolicy(oldLoadInfo->GetOpenerPolicy());
-  }
-
   OriginAttributes attrs;
 
   // Inherit origin attributes from PrincipalToInherit if inheritAttrs is
   // true. Otherwise we just use the origin attributes from docshell.
   if (inheritAttrs) {
     MOZ_ASSERT(aLoadState->PrincipalToInherit(),
                "We should have PrincipalToInherit here.");
     attrs = aLoadState->PrincipalToInherit()->OriginAttributesRef();
--- a/dom/base/ThirdPartyUtil.cpp
+++ b/dom/base/ThirdPartyUtil.cpp
@@ -78,42 +78,30 @@ nsresult ThirdPartyUtil::IsThirdPartyInt
   LOG(("ThirdPartyUtil::IsThirdPartyInternal %s =? %s", aFirstDomain.get(),
        secondDomain.get()));
   if (NS_FAILED(rv)) return rv;
 
   *aResult = IsThirdPartyInternal(aFirstDomain, secondDomain);
   return NS_OK;
 }
 
+// Get the URI associated with a window.
 NS_IMETHODIMP
-ThirdPartyUtil::GetPrincipalFromWindow(mozIDOMWindowProxy* aWin,
-                                       nsIPrincipal** result) {
+ThirdPartyUtil::GetURIFromWindow(mozIDOMWindowProxy* aWin, nsIURI** result) {
+  nsresult rv;
   nsCOMPtr<nsIScriptObjectPrincipal> scriptObjPrin = do_QueryInterface(aWin);
   if (!scriptObjPrin) {
     return NS_ERROR_INVALID_ARG;
   }
 
-  nsCOMPtr<nsIPrincipal> prin = scriptObjPrin->GetPrincipal();
+  nsIPrincipal* prin = scriptObjPrin->GetPrincipal();
   if (!prin) {
     return NS_ERROR_INVALID_ARG;
   }
 
-  prin.forget(result);
-  return NS_OK;
-}
-
-// Get the URI associated with a window.
-NS_IMETHODIMP
-ThirdPartyUtil::GetURIFromWindow(mozIDOMWindowProxy* aWin, nsIURI** result) {
-  nsCOMPtr<nsIPrincipal> prin;
-  nsresult rv = GetPrincipalFromWindow(aWin, getter_AddRefs(prin));
-  if (NS_FAILED(rv)) {
-    return rv;
-  }
-
   if (prin->GetIsNullPrincipal()) {
     LOG(("ThirdPartyUtil::GetURIFromWindow can't use null principal\n"));
     return NS_ERROR_INVALID_ARG;
   }
 
   rv = prin->GetURI(result);
   return rv;
 }
--- a/ipc/glue/BackgroundUtils.cpp
+++ b/ipc/glue/BackgroundUtils.cpp
@@ -480,18 +480,17 @@ nsresult LoadInfoToLoadInfoArgs(nsILoadI
       redirectChainIncludingInternalRedirects, redirectChain,
       ancestorPrincipals, aLoadInfo->AncestorOuterWindowIDs(), ipcClientInfo,
       ipcReservedClientInfo, ipcInitialClientInfo, ipcController,
       aLoadInfo->CorsUnsafeHeaders(), aLoadInfo->GetForcePreflight(),
       aLoadInfo->GetIsPreflight(), aLoadInfo->GetLoadTriggeredFromExternal(),
       aLoadInfo->GetServiceWorkerTaintingSynthesized(),
       aLoadInfo->GetDocumentHasUserInteracted(),
       aLoadInfo->GetDocumentHasLoaded(),
-      aLoadInfo->GetIsFromProcessingFrameAttributes(),
-      aLoadInfo->GetOpenerPolicy());
+      aLoadInfo->GetIsFromProcessingFrameAttributes());
 
   return NS_OK;
 }
 
 nsresult LoadInfoArgsToLoadInfo(
     const OptionalLoadInfoArgs& aOptionalLoadInfoArgs,
     nsILoadInfo** outLoadInfo) {
   if (aOptionalLoadInfoArgs.type() == OptionalLoadInfoArgs::Tvoid_t) {
@@ -643,51 +642,46 @@ nsresult LoadInfoArgsToLoadInfo(
       loadInfoArgs.serviceWorkerTaintingSynthesized(),
       loadInfoArgs.documentHasUserInteracted(),
       loadInfoArgs.documentHasLoaded());
 
   if (loadInfoArgs.isFromProcessingFrameAttributes()) {
     loadInfo->SetIsFromProcessingFrameAttributes();
   }
 
-  loadInfo->SetOpenerPolicy(loadInfoArgs.openerPolicy());
-
   loadInfo.forget(outLoadInfo);
   return NS_OK;
 }
 
 void LoadInfoToParentLoadInfoForwarder(
     nsILoadInfo* aLoadInfo, ParentLoadInfoForwarderArgs* aForwarderArgsOut) {
   if (!aLoadInfo) {
     *aForwarderArgsOut = ParentLoadInfoForwarderArgs(
         false, void_t(), nsILoadInfo::TAINTING_BASIC,
         false,  // serviceWorkerTaintingSynthesized
         false,  // documentHasUserInteracted
-        false,  // documentHasLoaded
-        nsILoadInfo::OPENER_POLICY_NULL);
+        false   // documentHasLoaded
+    );
     return;
   }
 
   OptionalIPCServiceWorkerDescriptor ipcController = void_t();
   Maybe<ServiceWorkerDescriptor> controller(aLoadInfo->GetController());
   if (controller.isSome()) {
     ipcController = controller.ref().ToIPC();
   }
 
   uint32_t tainting = nsILoadInfo::TAINTING_BASIC;
   Unused << aLoadInfo->GetTainting(&tainting);
 
-  nsILoadInfo::CrossOriginOpenerPolicy openerPolicy =
-      aLoadInfo->GetOpenerPolicy();
-
   *aForwarderArgsOut = ParentLoadInfoForwarderArgs(
       aLoadInfo->GetAllowInsecureRedirectToDataURI(), ipcController, tainting,
       aLoadInfo->GetServiceWorkerTaintingSynthesized(),
       aLoadInfo->GetDocumentHasUserInteracted(),
-      aLoadInfo->GetDocumentHasLoaded(), openerPolicy);
+      aLoadInfo->GetDocumentHasLoaded());
 }
 
 nsresult MergeParentLoadInfoForwarder(
     ParentLoadInfoForwarderArgs const& aForwarderArgs, nsILoadInfo* aLoadInfo) {
   if (!aLoadInfo) {
     return NS_OK;
   }
 
@@ -706,19 +700,16 @@ nsresult MergeParentLoadInfoForwarder(
 
   if (aForwarderArgs.serviceWorkerTaintingSynthesized()) {
     aLoadInfo->SynthesizeServiceWorkerTainting(
         static_cast<LoadTainting>(aForwarderArgs.tainting()));
   } else {
     aLoadInfo->MaybeIncreaseTainting(aForwarderArgs.tainting());
   }
 
-  MOZ_ALWAYS_SUCCEEDS(
-      aLoadInfo->SetOpenerPolicy(aForwarderArgs.openerPolicy()));
-
   MOZ_ALWAYS_SUCCEEDS(aLoadInfo->SetDocumentHasUserInteracted(
       aForwarderArgs.documentHasUserInteracted()));
   MOZ_ALWAYS_SUCCEEDS(
       aLoadInfo->SetDocumentHasLoaded(aForwarderArgs.documentHasLoaded()));
 
   return NS_OK;
 }
 
--- a/netwerk/base/LoadInfo.cpp
+++ b/netwerk/base/LoadInfo.cpp
@@ -86,18 +86,17 @@ LoadInfo::LoadInfo(
       mIsDocshellReload(false),
       mSendCSPViolationEvents(true),
       mForcePreflight(false),
       mIsPreflight(false),
       mLoadTriggeredFromExternal(false),
       mServiceWorkerTaintingSynthesized(false),
       mDocumentHasUserInteracted(false),
       mDocumentHasLoaded(false),
-      mIsFromProcessingFrameAttributes(false),
-      mOpenerPolicy(nsILoadInfo::OPENER_POLICY_NULL) {
+      mIsFromProcessingFrameAttributes(false) {
   MOZ_ASSERT(mLoadingPrincipal);
   MOZ_ASSERT(mTriggeringPrincipal);
 
 #ifdef DEBUG
   // TYPE_DOCUMENT loads initiated by javascript tests will go through
   // nsIOService and use the wrong constructor.  Don't enforce the
   // !TYPE_DOCUMENT check in those cases
   bool skipContentTypeCheck = false;
@@ -370,18 +369,17 @@ LoadInfo::LoadInfo(nsPIDOMWindowOuter* a
       mIsDocshellReload(false),
       mSendCSPViolationEvents(true),
       mForcePreflight(false),
       mIsPreflight(false),
       mLoadTriggeredFromExternal(false),
       mServiceWorkerTaintingSynthesized(false),
       mDocumentHasUserInteracted(false),
       mDocumentHasLoaded(false),
-      mIsFromProcessingFrameAttributes(false),
-      mOpenerPolicy(nsILoadInfo::OPENER_POLICY_NULL) {
+      mIsFromProcessingFrameAttributes(false) {
   // Top-level loads are never third-party
   // Grab the information we can out of the window.
   MOZ_ASSERT(aOuterWindow);
   MOZ_ASSERT(mTriggeringPrincipal);
 
   // if the load is sandboxed, we can not also inherit the principal
   if (mSecurityFlags & nsILoadInfo::SEC_SANDBOXED) {
     mForceInheritPrincipalDropped =
@@ -478,18 +476,17 @@ LoadInfo::LoadInfo(const LoadInfo& rhs)
       mForcePreflight(rhs.mForcePreflight),
       mIsPreflight(rhs.mIsPreflight),
       mLoadTriggeredFromExternal(rhs.mLoadTriggeredFromExternal),
       // mServiceWorkerTaintingSynthesized must be handled specially during
       // redirect
       mServiceWorkerTaintingSynthesized(false),
       mDocumentHasUserInteracted(rhs.mDocumentHasUserInteracted),
       mDocumentHasLoaded(rhs.mDocumentHasLoaded),
-      mIsFromProcessingFrameAttributes(rhs.mIsFromProcessingFrameAttributes),
-      mOpenerPolicy(rhs.mOpenerPolicy) {}
+      mIsFromProcessingFrameAttributes(rhs.mIsFromProcessingFrameAttributes) {}
 
 LoadInfo::LoadInfo(
     nsIPrincipal* aLoadingPrincipal, nsIPrincipal* aTriggeringPrincipal,
     nsIPrincipal* aPrincipalToInherit, nsIPrincipal* aSandboxedLoadingPrincipal,
     nsIPrincipal* aTopLevelPrincipal,
     nsIPrincipal* aTopLevelStorageAreaPrincipal, nsIURI* aResultPrincipalURI,
     const Maybe<ClientInfo>& aClientInfo,
     const Maybe<ClientInfo>& aReservedClientInfo,
@@ -558,18 +555,17 @@ LoadInfo::LoadInfo(
       mAncestorOuterWindowIDs(aAncestorOuterWindowIDs),
       mCorsUnsafeHeaders(aCorsUnsafeHeaders),
       mForcePreflight(aForcePreflight),
       mIsPreflight(aIsPreflight),
       mLoadTriggeredFromExternal(aLoadTriggeredFromExternal),
       mServiceWorkerTaintingSynthesized(aServiceWorkerTaintingSynthesized),
       mDocumentHasUserInteracted(aDocumentHasUserInteracted),
       mDocumentHasLoaded(aDocumentHasLoaded),
-      mIsFromProcessingFrameAttributes(false),
-      mOpenerPolicy(nsILoadInfo::OPENER_POLICY_NULL) {
+      mIsFromProcessingFrameAttributes(false) {
   // Only top level TYPE_DOCUMENT loads can have a null loadingPrincipal
   MOZ_ASSERT(mLoadingPrincipal ||
              aContentPolicyType == nsIContentPolicy::TYPE_DOCUMENT);
   MOZ_ASSERT(mTriggeringPrincipal);
 
   mRedirectChainIncludingInternalRedirects.SwapElements(
       aRedirectChainIncludingInternalRedirects);
 
@@ -1398,22 +1394,10 @@ LoadInfo::GetCspEventListener(nsICSPEven
 }
 
 NS_IMETHODIMP
 LoadInfo::SetCspEventListener(nsICSPEventListener* aCSPEventListener) {
   mCSPEventListener = aCSPEventListener;
   return NS_OK;
 }
 
-NS_IMETHODIMP
-LoadInfo::GetOpenerPolicy(nsILoadInfo::CrossOriginOpenerPolicy* aOpenerPolicy) {
-  *aOpenerPolicy = mOpenerPolicy;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-LoadInfo::SetOpenerPolicy(nsILoadInfo::CrossOriginOpenerPolicy aOpenerPolicy) {
-  mOpenerPolicy = aOpenerPolicy;
-  return NS_OK;
-}
-
 }  // namespace net
 }  // namespace mozilla
--- a/netwerk/base/LoadInfo.h
+++ b/netwerk/base/LoadInfo.h
@@ -199,16 +199,14 @@ class LoadInfo final : public nsILoadInf
   bool mServiceWorkerTaintingSynthesized;
   bool mDocumentHasUserInteracted;
   bool mDocumentHasLoaded;
 
   // Is true if this load was triggered by processing the attributes of the
   // browsing context container.
   // See nsILoadInfo.isFromProcessingFrameAttributes
   bool mIsFromProcessingFrameAttributes;
-
-  nsILoadInfo::CrossOriginOpenerPolicy mOpenerPolicy;
 };
 
 }  // namespace net
 }  // namespace mozilla
 
 #endif  // mozilla_LoadInfo_h
--- a/netwerk/base/mozIThirdPartyUtil.idl
+++ b/netwerk/base/mozIThirdPartyUtil.idl
@@ -2,17 +2,16 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsISupports.idl"
 
 interface nsIURI;
 interface mozIDOMWindowProxy;
 interface nsIChannel;
-interface nsIPrincipal;
 
 /**
  * Utility functions for determining whether a given URI, channel, or window
  * hierarchy is third party with respect to a known URI.
  */
 [scriptable, uuid(fd82700e-ffb4-4932-b7d6-08f0b5697dda)]
 interface mozIThirdPartyUtil : nsISupports
 {
@@ -146,23 +145,16 @@ interface mozIThirdPartyUtil : nsISuppor
    * getURIFromWindow
    *
    * Returns the URI associated with the script object principal for the
    * window.
    */
   nsIURI getURIFromWindow(in mozIDOMWindowProxy aWindow);
 
   /**
-   * getPrincipalFromWindow
-   *
-   * Returns the script object principal for the window.
-   */
-  nsIPrincipal getPrincipalFromWindow(in mozIDOMWindowProxy aWindow);
-
-  /**
    * getTopWindowForChannel
    *
    * Returns the top-level window associated with the given channel.
    */
   [noscript]
   mozIDOMWindowProxy getTopWindowForChannel(in nsIChannel aChannel, [optional] in nsIURI aURIBeingLoaded);
 };
 
--- a/netwerk/base/nsILoadInfo.idl
+++ b/netwerk/base/nsILoadInfo.idl
@@ -1067,20 +1067,9 @@ interface nsILoadInfo : nsISupports
   attribute nsICSPEventListener cspEventListener;
 
   /**
    * This attribute will be true if this is a load triggered by
    * https://html.spec.whatwg.org/multipage/iframe-embed-object.html#process-the-iframe-attributes
    * or https://html.spec.whatwg.org/multipage/obsolete.html#process-the-frame-attributes
    */
   [infallible] readonly attribute boolean isFromProcessingFrameAttributes;
-
-  cenum CrossOriginOpenerPolicy : 8 {
-    OPENER_POLICY_NULL           = 0,
-    OPENER_POLICY_SAME_ORIGIN    = 1,
-    OPENER_POLICY_SAME_SITE      = 2,
-    OPENER_POLICY_UNSAFE_ALLOW_OUTGOING_FLAG = 0x80,
-    OPENER_POLICY_SAME_ORIGIN_ALLOW_OUTGOING = OPENER_POLICY_SAME_ORIGIN | OPENER_POLICY_UNSAFE_ALLOW_OUTGOING_FLAG,
-    OPENER_POLICY_SAME_SITE_ALLOW_OUTGOING = OPENER_POLICY_SAME_SITE | OPENER_POLICY_UNSAFE_ALLOW_OUTGOING_FLAG
-  };
-
-  [infallible] attribute nsILoadInfo_CrossOriginOpenerPolicy openerPolicy;
 };
--- a/netwerk/ipc/NeckoChannelParams.ipdlh
+++ b/netwerk/ipc/NeckoChannelParams.ipdlh
@@ -9,26 +9,24 @@ include protocol PHttpChannel;
 include protocol PFTPChannel;
 include protocol PChildToParentStream;
 include BlobTypes;
 include ClientIPCTypes;
 include URIParams;
 include IPCServiceWorkerDescriptor;
 include IPCStream;
 include PBackgroundSharedTypes;
-include DOMTypes;
 
 using mozilla::OriginAttributes from "mozilla/ipc/BackgroundUtils.h";
 using struct mozilla::void_t from "ipc/IPCMessageUtils.h";
 using RequestHeaderTuples from "mozilla/net/PHttpChannelParams.h";
 using ArrayOfStringPairs from "mozilla/net/PHttpChannelParams.h";
 using struct nsHttpAtom from "nsHttp.h";
 using class mozilla::net::nsHttpResponseHead from "nsHttpResponseHead.h";
 using class mozilla::TimeStamp from "mozilla/TimeStamp.h";
-using nsILoadInfo::CrossOriginOpenerPolicy from "mozilla/net/NeckoMessageUtils.h";
 
 namespace mozilla {
 namespace net {
 
 //-----------------------------------------------------------------------------
 // LoadInfo IPDL structs
 //-----------------------------------------------------------------------------
 
@@ -108,17 +106,16 @@ struct LoadInfoArgs
   nsCString[]                 corsUnsafeHeaders;
   bool                        forcePreflight;
   bool                        isPreflight;
   bool                        loadTriggeredFromExternal;
   bool                        serviceWorkerTaintingSynthesized;
   bool                        documentHasUserInteracted;
   bool                        documentHasLoaded;
   bool                        isFromProcessingFrameAttributes;
-  CrossOriginOpenerPolicy     openerPolicy;
 };
 
 /**
  * Not every channel necessarily has a loadInfo attached.
  */
 union OptionalLoadInfoArgs
 {
   void_t;
@@ -149,18 +146,16 @@ struct ParentLoadInfoForwarderArgs
 
   // We must also note that the tainting value was explicitly set
   // by the service worker.
   bool serviceWorkerTaintingSynthesized;
 
   bool documentHasUserInteracted;
   bool documentHasLoaded;
 
-  CrossOriginOpenerPolicy openerPolicy;
-
   // IMPORTANT: when you add new properites here you must also update
   // LoadInfoToParentLoadInfoForwarder and MergeParentLoadInfoForwarder
   // in BackgroundUtils.cpp/.h!
 };
 
 /**
  * This structure is used to carry selected properties of a LoadInfo
  * object to the parent process that might have changed in the child
@@ -208,17 +203,16 @@ struct HttpChannelOpenArgs
   // set originalURI != uri (about:credits?); also not clear if
   // chrome channel would ever need to know.  Get rid of next arg?
   OptionalURIParams           original;
   OptionalURIParams           doc;
   OptionalURIParams           referrer;
   uint32_t                    referrerPolicy;
   OptionalURIParams           apiRedirectTo;
   OptionalURIParams           topWindowURI;
-  nsIPrincipal                topWindowPrincipal;
   uint32_t                    loadFlags;
   RequestHeaderTuples         requestHeaders;
   nsCString                   requestMethod;
   OptionalIPCStream           uploadStream;
   bool                        uploadStreamHasHeaders;
   int16_t                     priority;
   uint32_t                    classOfService;
   uint8_t                     redirectionLimit;
--- a/netwerk/ipc/NeckoMessageUtils.h
+++ b/netwerk/ipc/NeckoMessageUtils.h
@@ -11,17 +11,16 @@
 #include "ipc/IPCMessageUtils.h"
 #include "nsExceptionHandler.h"
 #include "nsIHttpChannel.h"
 #include "nsPrintfCString.h"
 #include "nsString.h"
 #include "prio.h"
 #include "mozilla/net/DNS.h"
 #include "TimingStruct.h"
-#include "nsILoadInfo.h"
 
 namespace IPC {
 
 // nsIPermissionManager utilities
 
 struct Permission {
   nsCString origin, type;
   uint32_t capability, expireType;
@@ -182,26 +181,11 @@ struct ParamTraits<mozilla::net::Resourc
 };
 
 template <>
 struct ParamTraits<nsIHttpChannel::FlashPluginState>
     : public ContiguousEnumSerializerInclusive<
           nsIHttpChannel::FlashPluginState, nsIHttpChannel::FlashPluginUnknown,
           nsIHttpChannel::FlashPluginLastValue> {};
 
-struct CrossOriginOpenerPolicyValidator {
-  static bool IsLegalValue(nsILoadInfo::CrossOriginOpenerPolicy e) {
-    return e == nsILoadInfo::OPENER_POLICY_NULL ||
-           e == nsILoadInfo::OPENER_POLICY_SAME_ORIGIN ||
-           e == nsILoadInfo::OPENER_POLICY_SAME_SITE ||
-           e == nsILoadInfo::OPENER_POLICY_SAME_ORIGIN_ALLOW_OUTGOING ||
-           e == nsILoadInfo::OPENER_POLICY_SAME_SITE_ALLOW_OUTGOING;
-  }
-};
-
-template <>
-struct ParamTraits<nsILoadInfo::CrossOriginOpenerPolicy>
-    : EnumSerializer<nsILoadInfo::CrossOriginOpenerPolicy,
-                     CrossOriginOpenerPolicyValidator> {};
-
 }  // namespace IPC
 
 #endif  // mozilla_net_NeckoMessageUtils_h
--- a/netwerk/protocol/http/HttpBaseChannel.cpp
+++ b/netwerk/protocol/http/HttpBaseChannel.cpp
@@ -2228,21 +2228,16 @@ HttpBaseChannel::RedirectTo(nsIURI* targ
 
 NS_IMETHODIMP
 HttpBaseChannel::SwitchProcessTo(mozilla::dom::Promise* aTabParent,
                                  uint64_t aIdentifier) {
   return NS_ERROR_NOT_AVAILABLE;
 }
 
 NS_IMETHODIMP
-HttpBaseChannel::HasCrossOriginOpenerPolicyMismatch(bool* aMismatch) {
-  return NS_ERROR_NOT_AVAILABLE;
-}
-
-NS_IMETHODIMP
 HttpBaseChannel::UpgradeToSecure() {
   // Upgrades are handled internally between http-on-modify-request and
   // http-on-before-connect, which means upgrades are only possible during
   // on-modify, or WebRequest.onBeforeRequest in Web Extensions.  Once we are
   // past the code path where upgrades are handled, attempting an upgrade
   // will throw an error.
   NS_ENSURE_TRUE(mUpgradableToSecure, NS_ERROR_NOT_AVAILABLE);
 
@@ -2327,26 +2322,16 @@ HttpBaseChannel::SetTopWindowURIIfUnknow
     return NS_ERROR_FAILURE;
   }
 
   mTopWindowURI = aTopWindowURI;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-HttpBaseChannel::SetTopWindowPrincipal(nsIPrincipal* aTopWindowPrincipal) {
-  if (!aTopWindowPrincipal) {
-    return NS_ERROR_INVALID_ARG;
-  }
-
-  mTopWindowPrincipal = aTopWindowPrincipal;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
 HttpBaseChannel::GetTopWindowURI(nsIURI** aTopWindowURI) {
   nsCOMPtr<nsIURI> uriBeingLoaded =
       AntiTrackingCommon::MaybeGetDocumentURIBeingLoaded(this);
   return GetTopWindowURI(uriBeingLoaded, aTopWindowURI);
 }
 
 nsresult HttpBaseChannel::GetTopWindowURI(nsIURI* aURIBeingLoaded,
                                           nsIURI** aTopWindowURI) {
@@ -2374,28 +2359,16 @@ nsresult HttpBaseChannel::GetTopWindowUR
       }
 #endif
     }
   }
   NS_IF_ADDREF(*aTopWindowURI = mTopWindowURI);
   return rv;
 }
 
-nsresult HttpBaseChannel::GetTopWindowPrincipal(
-    nsIPrincipal** aTopWindowPrincipal) {
-  nsCOMPtr<mozIThirdPartyUtil> util = services::GetThirdPartyUtil();
-  nsCOMPtr<mozIDOMWindowProxy> win;
-  nsresult rv =
-      util->GetTopWindowForChannel(this, nullptr, getter_AddRefs(win));
-  if (NS_FAILED(rv)) {
-    return rv;
-  }
-  return util->GetPrincipalFromWindow(win, getter_AddRefs(mTopWindowPrincipal));
-}
-
 NS_IMETHODIMP
 HttpBaseChannel::GetDocumentURI(nsIURI** aDocumentURI) {
   NS_ENSURE_ARG_POINTER(aDocumentURI);
   *aDocumentURI = mDocumentURI;
   NS_IF_ADDREF(*aDocumentURI);
   return NS_OK;
 }
 
--- a/netwerk/protocol/http/HttpBaseChannel.h
+++ b/netwerk/protocol/http/HttpBaseChannel.h
@@ -216,17 +216,16 @@ class HttpBaseChannel : public nsHashPro
   NS_IMETHOD IsNoCacheResponse(bool *value) override;
   NS_IMETHOD IsPrivateResponse(bool *value) override;
   NS_IMETHOD GetResponseStatus(uint32_t *aValue) override;
   NS_IMETHOD GetResponseStatusText(nsACString &aValue) override;
   NS_IMETHOD GetRequestSucceeded(bool *aValue) override;
   NS_IMETHOD RedirectTo(nsIURI *newURI) override;
   NS_IMETHOD SwitchProcessTo(mozilla::dom::Promise *aTabParent,
                              uint64_t aIdentifier) override;
-  NS_IMETHOD HasCrossOriginOpenerPolicyMismatch(bool *aMismatch) override;
   NS_IMETHOD UpgradeToSecure() override;
   NS_IMETHOD GetRequestContextID(uint64_t *aRCID) override;
   NS_IMETHOD GetTransferSize(uint64_t *aTransferSize) override;
   NS_IMETHOD GetDecodedBodySize(uint64_t *aDecodedBodySize) override;
   NS_IMETHOD GetEncodedBodySize(uint64_t *aEncodedBodySize) override;
   NS_IMETHOD SetRequestContextID(uint64_t aRCID) override;
   NS_IMETHOD GetIsMainDocumentChannel(bool *aValue) override;
   NS_IMETHOD SetIsMainDocumentChannel(bool aValue) override;
@@ -291,17 +290,16 @@ class HttpBaseChannel : public nsHashPro
   NS_IMETHOD GetCorsMode(uint32_t *aCorsMode) override;
   NS_IMETHOD SetCorsMode(uint32_t aCorsMode) override;
   NS_IMETHOD GetRedirectMode(uint32_t *aRedirectMode) override;
   NS_IMETHOD SetRedirectMode(uint32_t aRedirectMode) override;
   NS_IMETHOD GetFetchCacheMode(uint32_t *aFetchCacheMode) override;
   NS_IMETHOD SetFetchCacheMode(uint32_t aFetchCacheMode) override;
   NS_IMETHOD GetTopWindowURI(nsIURI **aTopWindowURI) override;
   NS_IMETHOD SetTopWindowURIIfUnknown(nsIURI *aTopWindowURI) override;
-  NS_IMETHOD SetTopWindowPrincipal(nsIPrincipal *aTopWindowPrincipal) override;
   NS_IMETHOD GetProxyURI(nsIURI **proxyURI) override;
   virtual void SetCorsPreflightParameters(
       const nsTArray<nsCString> &unsafeHeaders) override;
   virtual void SetAltDataForChild(bool aIsForChild) override;
   NS_IMETHOD GetConnectionInfoHashKey(
       nsACString &aConnectionInfoHashKey) override;
   NS_IMETHOD GetIntegrityMetadata(nsAString &aIntegrityMetadata) override;
   NS_IMETHOD SetIntegrityMetadata(const nsAString &aIntegrityMetadata) override;
@@ -451,17 +449,16 @@ class HttpBaseChannel : public nsHashPro
 
   MOZ_MUST_USE nsresult SetTopWindowURI(nsIURI *aTopWindowURI) {
     mTopWindowURI = aTopWindowURI;
     return NS_OK;
   }
 
  protected:
   nsresult GetTopWindowURI(nsIURI *aURIBeingLoaded, nsIURI **aTopWindowURI);
-  nsresult GetTopWindowPrincipal(nsIPrincipal **aTopWindowPrincipal);
 
   // Handle notifying listener, removing from loadgroup if request failed.
   void DoNotifyListener();
   virtual void DoNotifyListenerCleanup() = 0;
 
   // drop reference to listener, its callbacks, and the progress sink
   virtual void ReleaseListeners();
 
@@ -547,17 +544,16 @@ class HttpBaseChannel : public nsHashPro
   nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
   nsCOMPtr<nsIProgressEventSink> mProgressSink;
   nsCOMPtr<nsIURI> mReferrer;
   nsCOMPtr<nsIApplicationCache> mApplicationCache;
   nsCOMPtr<nsIURI> mAPIRedirectToURI;
   nsCOMPtr<nsIURI> mProxyURI;
   nsCOMPtr<nsIPrincipal> mPrincipal;
   nsCOMPtr<nsIURI> mTopWindowURI;
-  nsCOMPtr<nsIPrincipal> mTopWindowPrincipal;
   nsCOMPtr<nsIStreamListener> mListener;
   nsCOMPtr<nsISupports> mListenerContext;
   // An instance of nsHTTPCompressConv
   nsCOMPtr<nsIStreamListener> mCompressListener;
 
  private:
   // Proxy release all members above on main thread.
   void ReleaseMainThreadOnlyReferences();
--- a/netwerk/protocol/http/HttpChannelChild.cpp
+++ b/netwerk/protocol/http/HttpChannelChild.cpp
@@ -2594,17 +2594,16 @@ already_AddRefed<nsIEventTarget> HttpCha
 
   if (!target) {
     target = GetMainThreadEventTarget();
   }
   return target.forget();
 }
 
 nsresult HttpChannelChild::ContinueAsyncOpen() {
-  nsresult rv;
   nsCString appCacheClientId;
   if (mInheritApplicationCache) {
     // Pick up an application cache from the notification
     // callbacks if available
     nsCOMPtr<nsIApplicationCacheContainer> appCacheContainer;
     GetCallback(appCacheContainer);
 
     if (appCacheContainer) {
@@ -2689,21 +2688,16 @@ nsresult HttpChannelChild::ContinueAsync
   GetClientSetCorsPreflightParameters(optionalCorsPreflightArgs);
 
   // NB: This call forces us to cache mTopWindowURI if we haven't already.
   nsCOMPtr<nsIURI> uri;
   GetTopWindowURI(mURI, getter_AddRefs(uri));
 
   SerializeURI(mTopWindowURI, openArgs.topWindowURI());
 
-  if (!mTopWindowPrincipal) {
-    GetTopWindowPrincipal(getter_AddRefs(mTopWindowPrincipal));
-  }
-  openArgs.topWindowPrincipal() = mTopWindowPrincipal;
-
   openArgs.preflightArgs() = optionalCorsPreflightArgs;
 
   openArgs.uploadStreamHasHeaders() = mUploadStreamHasHeaders;
   openArgs.priority() = mPriority;
   openArgs.classOfService() = mClassOfService;
   openArgs.redirectionLimit() = mRedirectionLimit;
   openArgs.allowSTS() = mAllowSTS;
   openArgs.thirdPartyFlags() = mThirdPartyFlags;
@@ -2721,17 +2715,18 @@ nsresult HttpChannelChild::ContinueAsync
   openArgs.cacheKey() = mCacheKey;
 
   openArgs.blockAuthPrompt() = mBlockAuthPrompt;
 
   openArgs.allowStaleCacheContent() = mAllowStaleCacheContent;
 
   openArgs.contentTypeHint() = mContentTypeHint;
 
-  rv = mozilla::ipc::LoadInfoToLoadInfoArgs(mLoadInfo, &openArgs.loadInfo());
+  nsresult rv =
+      mozilla::ipc::LoadInfoToLoadInfoArgs(mLoadInfo, &openArgs.loadInfo());
   NS_ENSURE_SUCCESS(rv, rv);
 
   EnsureRequestContextID();
   openArgs.requestContextID() = mRequestContextID;
 
   openArgs.corsMode() = mCorsMode;
   openArgs.redirectMode() = mRedirectMode;
 
--- a/netwerk/protocol/http/HttpChannelParent.cpp
+++ b/netwerk/protocol/http/HttpChannelParent.cpp
@@ -129,23 +129,23 @@ void HttpChannelParent::ActorDestroy(Act
 bool HttpChannelParent::Init(const HttpChannelCreationArgs& aArgs) {
   LOG(("HttpChannelParent::Init [this=%p]\n", this));
   AUTO_PROFILER_LABEL("HttpChannelParent::Init", NETWORK);
   switch (aArgs.type()) {
     case HttpChannelCreationArgs::THttpChannelOpenArgs: {
       const HttpChannelOpenArgs& a = aArgs.get_HttpChannelOpenArgs();
       return DoAsyncOpen(
           a.uri(), a.original(), a.doc(), a.referrer(), a.referrerPolicy(),
-          a.apiRedirectTo(), a.topWindowURI(), a.topWindowPrincipal(),
-          a.loadFlags(), a.requestHeaders(), a.requestMethod(),
-          a.uploadStream(), a.uploadStreamHasHeaders(), a.priority(),
-          a.classOfService(), a.redirectionLimit(), a.allowSTS(),
-          a.thirdPartyFlags(), a.resumeAt(), a.startPos(), a.entityID(),
-          a.chooseApplicationCache(), a.appCacheClientID(), a.allowSpdy(),
-          a.allowAltSvc(), a.beConservative(), a.tlsFlags(), a.loadInfo(),
+          a.apiRedirectTo(), a.topWindowURI(), a.loadFlags(),
+          a.requestHeaders(), a.requestMethod(), a.uploadStream(),
+          a.uploadStreamHasHeaders(), a.priority(), a.classOfService(),
+          a.redirectionLimit(), a.allowSTS(), a.thirdPartyFlags(), a.resumeAt(),
+          a.startPos(), a.entityID(), a.chooseApplicationCache(),
+          a.appCacheClientID(), a.allowSpdy(), a.allowAltSvc(),
+          a.beConservative(), a.tlsFlags(), a.loadInfo(),
           a.synthesizedResponseHead(), a.synthesizedSecurityInfoSerialization(),
           a.cacheKey(), a.requestContextID(), a.preflightArgs(),
           a.initialRwin(), a.blockAuthPrompt(),
           a.suspendAfterSynthesizeResponse(), a.allowStaleCacheContent(),
           a.contentTypeHint(), a.corsMode(), a.redirectMode(), a.channelId(),
           a.integrityMetadata(), a.contentWindowId(),
           a.preferredAlternativeTypes(), a.topLevelOuterContentWindowId(),
           a.launchServiceWorkerStart(), a.launchServiceWorkerEnd(),
@@ -384,23 +384,23 @@ void HttpChannelParent::InvokeAsyncOpen(
     AsyncOpenFailed(rv);
   }
 }
 
 bool HttpChannelParent::DoAsyncOpen(
     const URIParams& aURI, const OptionalURIParams& aOriginalURI,
     const OptionalURIParams& aDocURI, const OptionalURIParams& aReferrerURI,
     const uint32_t& aReferrerPolicy, const OptionalURIParams& aAPIRedirectToURI,
-    const OptionalURIParams& aTopWindowURI, nsIPrincipal* aTopWindowPrincipal,
-    const uint32_t& aLoadFlags, const RequestHeaderTuples& requestHeaders,
-    const nsCString& requestMethod, const OptionalIPCStream& uploadStream,
-    const bool& uploadStreamHasHeaders, const int16_t& priority,
-    const uint32_t& classOfService, const uint8_t& redirectionLimit,
-    const bool& allowSTS, const uint32_t& thirdPartyFlags,
-    const bool& doResumeAt, const uint64_t& startPos, const nsCString& entityID,
+    const OptionalURIParams& aTopWindowURI, const uint32_t& aLoadFlags,
+    const RequestHeaderTuples& requestHeaders, const nsCString& requestMethod,
+    const OptionalIPCStream& uploadStream, const bool& uploadStreamHasHeaders,
+    const int16_t& priority, const uint32_t& classOfService,
+    const uint8_t& redirectionLimit, const bool& allowSTS,
+    const uint32_t& thirdPartyFlags, const bool& doResumeAt,
+    const uint64_t& startPos, const nsCString& entityID,
     const bool& chooseApplicationCache, const nsCString& appCacheClientID,
     const bool& allowSpdy, const bool& allowAltSvc, const bool& beConservative,
     const uint32_t& tlsFlags, const OptionalLoadInfoArgs& aLoadInfoArgs,
     const OptionalHttpResponseHead& aSynthesizedResponseHead,
     const nsCString& aSecurityInfoSerialization, const uint32_t& aCacheKey,
     const uint64_t& aRequestContextID,
     const OptionalCorsPreflightArgs& aCorsPreflightArgs,
     const uint32_t& aInitialRwin, const bool& aBlockAuthPrompt,
@@ -493,19 +493,16 @@ bool HttpChannelParent::DoAsyncOpen(
                                                     aReferrerPolicy);
     MOZ_ASSERT(NS_SUCCEEDED(rv));
   }
   if (apiRedirectToUri) httpChannel->RedirectTo(apiRedirectToUri);
   if (topWindowUri) {
     rv = httpChannel->SetTopWindowURI(topWindowUri);
     MOZ_ASSERT(NS_SUCCEEDED(rv));
   }
-
-  httpChannel->SetTopWindowPrincipal(aTopWindowPrincipal);
-
   if (aLoadFlags != nsIRequest::LOAD_NORMAL)
     httpChannel->SetLoadFlags(aLoadFlags);
 
   if (aForceMainDocumentChannel) {
     httpChannel->SetIsMainDocumentChannel(true);
   }
 
   for (uint32_t i = 0; i < requestHeaders.Length(); i++) {
--- a/netwerk/protocol/http/HttpChannelParent.h
+++ b/netwerk/protocol/http/HttpChannelParent.h
@@ -135,27 +135,27 @@ class HttpChannelParent final : public n
   MOZ_MUST_USE bool ConnectChannel(const uint32_t& channelId,
                                    const bool& shouldIntercept);
 
   MOZ_MUST_USE bool DoAsyncOpen(
       const URIParams& uri, const OptionalURIParams& originalUri,
       const OptionalURIParams& docUri, const OptionalURIParams& referrerUri,
       const uint32_t& referrerPolicy,
       const OptionalURIParams& internalRedirectUri,
-      const OptionalURIParams& topWindowUri, nsIPrincipal* aTopWindowPrincipal,
-      const uint32_t& loadFlags, const RequestHeaderTuples& requestHeaders,
-      const nsCString& requestMethod, const OptionalIPCStream& uploadStream,
-      const bool& uploadStreamHasHeaders, const int16_t& priority,
-      const uint32_t& classOfService, const uint8_t& redirectionLimit,
-      const bool& allowSTS, const uint32_t& thirdPartyFlags,
-      const bool& doResumeAt, const uint64_t& startPos,
-      const nsCString& entityID, const bool& chooseApplicationCache,
-      const nsCString& appCacheClientID, const bool& allowSpdy,
-      const bool& allowAltSvc, const bool& beConservative,
-      const uint32_t& tlsFlags, const OptionalLoadInfoArgs& aLoadInfoArgs,
+      const OptionalURIParams& topWindowUri, const uint32_t& loadFlags,
+      const RequestHeaderTuples& requestHeaders, const nsCString& requestMethod,
+      const OptionalIPCStream& uploadStream, const bool& uploadStreamHasHeaders,
+      const int16_t& priority, const uint32_t& classOfService,
+      const uint8_t& redirectionLimit, const bool& allowSTS,
+      const uint32_t& thirdPartyFlags, const bool& doResumeAt,
+      const uint64_t& startPos, const nsCString& entityID,
+      const bool& chooseApplicationCache, const nsCString& appCacheClientID,
+      const bool& allowSpdy, const bool& allowAltSvc,
+      const bool& beConservative, const uint32_t& tlsFlags,
+      const OptionalLoadInfoArgs& aLoadInfoArgs,
       const OptionalHttpResponseHead& aSynthesizedResponseHead,
       const nsCString& aSecurityInfoSerialization, const uint32_t& aCacheKey,
       const uint64_t& aRequestContextID,
       const OptionalCorsPreflightArgs& aCorsPreflightArgs,
       const uint32_t& aInitialRwin, const bool& aBlockAuthPrompt,
       const bool& aSuspendAfterSynthesizeResponse,
       const bool& aAllowStaleCacheContent, const nsCString& aContentTypeHint,
       const uint32_t& aCorsMode, const uint32_t& aRedirectMode,
--- a/netwerk/protocol/http/NullHttpChannel.cpp
+++ b/netwerk/protocol/http/NullHttpChannel.cpp
@@ -270,21 +270,16 @@ NullHttpChannel::RedirectTo(nsIURI *aNew
 
 NS_IMETHODIMP
 NullHttpChannel::SwitchProcessTo(mozilla::dom::Promise *aTabParent,
                                  uint64_t aIdentifier) {
   return NS_ERROR_NOT_AVAILABLE;
 }
 
 NS_IMETHODIMP
-NullHttpChannel::HasCrossOriginOpenerPolicyMismatch(bool *aMismatch) {
-  return NS_ERROR_NOT_AVAILABLE;
-}
-
-NS_IMETHODIMP
 NullHttpChannel::UpgradeToSecure() { return NS_ERROR_NOT_IMPLEMENTED; }
 
 NS_IMETHODIMP
 NullHttpChannel::GetRequestContextID(uint64_t *_retval) {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
--- a/netwerk/protocol/http/TrackingDummyChannel.cpp
+++ b/netwerk/protocol/http/TrackingDummyChannel.cpp
@@ -546,21 +546,16 @@ TrackingDummyChannel::GetTopWindowURI(ns
 }
 
 NS_IMETHODIMP
 TrackingDummyChannel::SetTopWindowURIIfUnknown(nsIURI* aTopWindowURI) {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
-TrackingDummyChannel::SetTopWindowPrincipal(nsIPrincipal* aTopWindowPrincipal) {
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP
 TrackingDummyChannel::GetProxyURI(nsIURI** aProxyURI) {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 void TrackingDummyChannel::SetCorsPreflightParameters(
     const nsTArray<nsCString>& aUnsafeHeaders) {}
 
 void TrackingDummyChannel::SetAltDataForChild(bool aIsForChild) {}
--- a/netwerk/protocol/http/nsHttpAtomList.h
+++ b/netwerk/protocol/http/nsHttpAtomList.h
@@ -35,17 +35,16 @@ HTTP_ATOM(Content_Disposition, "Content-
 HTTP_ATOM(Content_Encoding, "Content-Encoding")
 HTTP_ATOM(Content_Language, "Content-Language")
 HTTP_ATOM(Content_Length, "Content-Length")
 HTTP_ATOM(Content_Location, "Content-Location")
 HTTP_ATOM(Content_MD5, "Content-MD5")
 HTTP_ATOM(Content_Range, "Content-Range")
 HTTP_ATOM(Content_Type, "Content-Type")
 HTTP_ATOM(Cookie, "Cookie")
-HTTP_ATOM(Cross_Origin_Opener_Policy, "Cross-Origin-Opener-Policy")
 HTTP_ATOM(Date, "Date")
 HTTP_ATOM(DAV, "DAV")
 HTTP_ATOM(Depth, "Depth")
 HTTP_ATOM(Destination, "Destination")
 HTTP_ATOM(DoNotTrack, "DNT")
 HTTP_ATOM(ETag, "Etag")
 HTTP_ATOM(Expect, "Expect")
 HTTP_ATOM(Expires, "Expires")
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -118,17 +118,16 @@
 #include "nsIMultiplexInputStream.h"
 #include "../../cache2/CacheFileUtils.h"
 #include "nsINetworkLinkService.h"
 #include "mozilla/dom/PromiseNativeHandler.h"
 #include "mozilla/dom/Promise.h"
 #include "mozilla/dom/ServiceWorkerUtils.h"
 #include "mozilla/net/AsyncUrlChannelClassifier.h"
 #include "mozilla/net/UrlClassifierFeatureFactory.h"
-#include "nsIWebNavigation.h"
 
 #ifdef MOZ_TASK_TRACER
 #  include "GeckoTaskTracer.h"
 #endif
 
 #ifdef MOZ_GECKO_PROFILER
 #  include "ProfilerMarkerPayload.h"
 #endif
@@ -7148,159 +7147,16 @@ nsresult nsHttpChannel::StartCrossProces
                                         mCrossProcessRedirectIdentifier);
 
   // This will suspend the channel
   rv = WaitForRedirectCallback();
 
   return rv;
 }
 
-static nsILoadInfo::CrossOriginOpenerPolicy GetCrossOriginOpenerPolicy(
-    nsHttpResponseHead *responseHead) {
-  MOZ_ASSERT(responseHead);
-
-  nsAutoCString openerPolicy;
-  Unused << responseHead->GetHeader(nsHttp::Cross_Origin_Opener_Policy,
-                                    openerPolicy);
-
-  // Cross-Origin-Opener-Policy = sameness [ RWS outgoing ]
-  // sameness = %s"same-origin" / %s"same-site" ; case-sensitive
-  // outgoing = %s"unsafe-allow-outgoing" ; case-sensitive
-
-  Tokenizer t(openerPolicy);
-  nsAutoCString sameness;
-  nsAutoCString outgoing;
-
-  // The return value will be true if we find any whitespace. If there is
-  // whitespace, then it must be followed by "unsafe-allow-outgoing" otherwise
-  // this is a malformed header value.
-  bool allowOutgoing = t.ReadUntil(Tokenizer::Token::Whitespace(), sameness);
-  if (allowOutgoing) {
-    t.SkipWhites();
-    bool foundEOF = t.ReadUntil(Tokenizer::Token::EndOfFile(), outgoing);
-    if (!foundEOF) {
-      // Malformed response. There should be no text after the second token.
-      return nsILoadInfo::OPENER_POLICY_NULL;
-    }
-    if (!outgoing.EqualsLiteral("unsafe-allow-outgoing")) {
-      // Malformed response. Only one allowed value for the second token.
-      return nsILoadInfo::OPENER_POLICY_NULL;
-    }
-  }
-
-  nsILoadInfo::CrossOriginOpenerPolicy policy = nsILoadInfo::OPENER_POLICY_NULL;
-  if (sameness.EqualsLiteral("same-origin")) {
-    policy = nsILoadInfo::OPENER_POLICY_SAME_ORIGIN;
-    if (allowOutgoing) {
-      policy = nsILoadInfo::OPENER_POLICY_SAME_ORIGIN_ALLOW_OUTGOING;
-    }
-  } else if (sameness.EqualsLiteral("same-site")) {
-    policy = nsILoadInfo::OPENER_POLICY_SAME_SITE;
-    if (allowOutgoing) {
-      policy = nsILoadInfo::OPENER_POLICY_SAME_SITE_ALLOW_OUTGOING;
-    }
-  }
-
-  return policy;
-}
-
-static bool CompareCrossOriginOpenerPolicies(
-    nsILoadInfo::CrossOriginOpenerPolicy documentPolicy,
-    nsIPrincipal *documentOrigin,
-    nsILoadInfo::CrossOriginOpenerPolicy resultPolicy,
-    nsIPrincipal *resultOrigin) {
-  if (documentPolicy == nsILoadInfo::OPENER_POLICY_NULL &&
-      resultPolicy == nsILoadInfo::OPENER_POLICY_NULL) {
-    return true;
-  }
-
-  if (documentPolicy != resultPolicy) {
-    return false;
-  }
-  // For the next checks the document and result will have matching policies.
-
-  // We either check if they are same origin or same site.
-  if ((documentPolicy & nsILoadInfo::OPENER_POLICY_SAME_ORIGIN) &&
-      documentOrigin->Equals(resultOrigin)) {
-    return true;
-  }
-
-  if (documentPolicy & nsILoadInfo::OPENER_POLICY_SAME_SITE) {
-    nsAutoCString siteOriginA;
-    nsAutoCString siteOriginB;
-
-    documentOrigin->GetSiteOrigin(siteOriginA);
-    resultOrigin->GetSiteOrigin(siteOriginB);
-    if (siteOriginA == siteOriginB) {
-      return true;
-    }
-  }
-
-  return false;
-}
-
-NS_IMETHODIMP
-nsHttpChannel::HasCrossOriginOpenerPolicyMismatch(bool *aMismatch) {
-  MOZ_ASSERT(aMismatch);
-  if (!aMismatch) {
-    return NS_ERROR_INVALID_ARG;
-  }
-
-  *aMismatch = false;
-  // Only consider Cross-Origin-Opener-Policy for toplevel document loads.
-  if (mLoadInfo->GetExternalContentPolicyType() !=
-      nsIContentPolicy::TYPE_DOCUMENT) {
-    return NS_OK;
-  }
-
-  // Maybe the channel failed and we have no response head?
-  nsHttpResponseHead *head =
-      mResponseHead ? mResponseHead : mCachedResponseHead;
-  if (!head) {
-    return NS_ERROR_NOT_AVAILABLE;
-  }
-
-  // Get the policy of the active document, and the policy for the result.
-  nsILoadInfo::CrossOriginOpenerPolicy documentPolicy =
-      mLoadInfo->GetOpenerPolicy();
-  nsILoadInfo::CrossOriginOpenerPolicy resultPolicy =
-      GetCrossOriginOpenerPolicy(head);
-
-  mLoadInfo->SetOpenerPolicy(resultPolicy);
-
-  // We use the top window principal as the documentOrigin
-  if (!mTopWindowPrincipal) {
-    GetTopWindowPrincipal(getter_AddRefs(mTopWindowPrincipal));
-  }
-
-  nsCOMPtr<nsIPrincipal> documentOrigin = mTopWindowPrincipal;
-  nsCOMPtr<nsIPrincipal> resultOrigin;
-
-  nsContentUtils::GetSecurityManager()->GetChannelResultPrincipal(
-      this, getter_AddRefs(resultOrigin));
-
-  if (!CompareCrossOriginOpenerPolicies(documentPolicy, documentOrigin,
-                                        resultPolicy, resultOrigin)) {
-    // If one of the following is false:
-    //   - doc is the initial about:blank document
-    //   - document's unsafe-allow-outgoing is true
-    //   - resultPolicy is null
-    // then we have a mismatch.
-    if (!documentOrigin->GetIsNullPrincipal() ||
-        !(documentPolicy &
-          nsILoadInfo::OPENER_POLICY_UNSAFE_ALLOW_OUTGOING_FLAG) ||
-        !(resultPolicy == nsILoadInfo::OPENER_POLICY_NULL)) {
-      *aMismatch = true;
-      return NS_OK;
-    }
-  }
-
-  return NS_OK;
-}
-
 NS_IMETHODIMP
 nsHttpChannel::OnStartRequest(nsIRequest *request, nsISupports *ctxt) {
   nsresult rv;
 
   MOZ_ASSERT(mRequestObserversCalled);
 
   AUTO_PROFILER_LABEL("nsHttpChannel::OnStartRequest", NETWORK);
 
--- a/netwerk/protocol/http/nsHttpChannel.h
+++ b/netwerk/protocol/http/nsHttpChannel.h
@@ -159,17 +159,16 @@ class nsHttpChannel final : public HttpB
   NS_IMETHOD GetSecurityInfo(nsISupports **aSecurityInfo) override;
   NS_IMETHOD AsyncOpen(nsIStreamListener *listener,
                        nsISupports *aContext) override;
   NS_IMETHOD AsyncOpen2(nsIStreamListener *aListener) override;
   // nsIHttpChannel
   NS_IMETHOD GetEncodedBodySize(uint64_t *aEncodedBodySize) override;
   NS_IMETHOD SwitchProcessTo(mozilla::dom::Promise *aTabParent,
                              uint64_t aIdentifier) override;
-  NS_IMETHOD HasCrossOriginOpenerPolicyMismatch(bool *aMismatch) override;
   // nsIHttpChannelInternal
   NS_IMETHOD SetupFallbackChannel(const char *aFallbackKey) override;
   NS_IMETHOD SetChannelIsForDownload(bool aChannelIsForDownload) override;
   NS_IMETHOD GetNavigationStartTimeStamp(TimeStamp *aTimeStamp) override;
   NS_IMETHOD SetNavigationStartTimeStamp(TimeStamp aTimeStamp) override;
   NS_IMETHOD CancelByChannelClassifier(nsresult aErrorCode) override;
   // nsISupportsPriority
   NS_IMETHOD SetPriority(int32_t value) override;
--- a/netwerk/protocol/http/nsIHttpChannel.idl
+++ b/netwerk/protocol/http/nsIHttpChannel.idl
@@ -453,23 +453,16 @@ interface nsIHttpChannel : nsIChannel
      *                      which the load will proceed in.
      * @param aIdentifier   a 64-bit ID which will be provided to the
      *                      ChildProcessChannelListener.
      */
     [must_use] void switchProcessTo(in Promise aTabPromise,
                                     in unsigned long long aIdentifier);
 
     /**
-     * Used to determine if there is a Cross-Origin-Opener-Policy mismatch
-     * that would require switching the channel to another process.
-     * @throws NS_ERROR_NOT_AVAILABLE if we don't have a responseHead
-     */
-    [must_use] boolean hasCrossOriginOpenerPolicyMismatch();
-
-    /**
      * Flags a channel to be upgraded to HTTPS.
      *
      * Upgrading to a secure channel must happen before or during
      * "http-on-modify-request". If redirectTo is called early as well, it
      * will win and upgradeToSecure will be a no-op.
      *
      * @throws NS_ERROR_NOT_AVAILABLE if called after the channel has already
      *         started to deliver the content to its listener.
--- a/netwerk/protocol/http/nsIHttpChannelInternal.idl
+++ b/netwerk/protocol/http/nsIHttpChannelInternal.idl
@@ -300,24 +300,16 @@ interface nsIHttpChannelInternal : nsISu
     /**
      * Set top-level window URI to this channel only when the topWindowURI
      * is null and there is no window associated to this channel.
      * Note that the current usage of this method is only for xpcshell test.
      */
     [must_use] void setTopWindowURIIfUnknown(in nsIURI topWindowURI);
 
     /**
-     * Set top-level window Principal for this channel.
-     * This method is used in HttpChannelParent to pass the window principal
-     * from the child to nsHttpChannel.
-     * It's also called directly in xpcshell-tests
-     */
-    [must_use] void setTopWindowPrincipal(in nsIPrincipal topWindowPrincipal);
-
-    /**
      * Read the proxy URI, which, if non-null, will be used to resolve
      * proxies for this channel.
      */
     [must_use] readonly attribute nsIURI proxyURI;
 
     /**
      * Make cross-origin CORS loads happen with a CORS preflight, and specify
      * the CORS preflight parameters.
--- a/netwerk/protocol/viewsource/nsViewSourceChannel.cpp
+++ b/netwerk/protocol/viewsource/nsViewSourceChannel.cpp
@@ -1004,26 +1004,16 @@ nsViewSourceChannel::RedirectTo(nsIURI *
 NS_IMETHODIMP
 nsViewSourceChannel::SwitchProcessTo(mozilla::dom::Promise *aTabParent,
                                      uint64_t aIdentifier) {
   return !mHttpChannel ? NS_ERROR_NULL_POINTER
                        : mHttpChannel->SwitchProcessTo(aTabParent, aIdentifier);
 }
 
 NS_IMETHODIMP
-nsViewSourceChannel::HasCrossOriginOpenerPolicyMismatch(bool *aMismatch) {
-  MOZ_ASSERT(aMismatch);
-  if (!aMismatch) {
-    return NS_ERROR_INVALID_ARG;
-  }
-  *aMismatch = false;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
 nsViewSourceChannel::UpgradeToSecure() {
   return !mHttpChannel ? NS_ERROR_NULL_POINTER
                        : mHttpChannel->UpgradeToSecure();
 }
 
 NS_IMETHODIMP
 nsViewSourceChannel::GetRequestContextID(uint64_t *_retval) {
   return !mHttpChannel ? NS_ERROR_NULL_POINTER
deleted file mode 100644
--- a/netwerk/test/unit/test_crossOriginOpenerPolicy.js
+++ /dev/null
@@ -1,223 +0,0 @@
-"use strict";
-
-const {HttpServer} = ChromeUtils.import("resource://testing-common/httpd.js");
-const {NetUtil} = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
-var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
-
-let testServer = null;
-
-function inChildProcess() {
-  return Cc["@mozilla.org/xre/app-info;1"]
-           .getService(Ci.nsIXULRuntime)
-           .processType != Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT;
-}
-
-class OnStartListener {
-  constructor(onStartCallback) {
-    this.callback = onStartCallback;
-    this.done = new Promise(resolve => { this.resolve = resolve; });
-  }
-
-  onStartRequest(request, context) {
-    this.callback(request.QueryInterface(Ci.nsIHttpChannel));
-  }
-
-  onDataAvailable(request, context, stream, offset, count) {
-    let string = NetUtil.readInputStreamToString(stream, count);
-  }
-
-  onStopRequest(request, context, status) { this.resolve(); }
-}
-
-
-function handler_null(metadata, response)
-{
-  info("request_null");
-  response.setStatusLine(metadata.httpVersion, 200, "OK");
-  response.setHeader("Content-Type", "text/plain", false);
-  let body = "foo";
-  response.bodyOutputStream.write(body, body.length);
-}
-
-function handler_same_origin(metadata, response)
-{
-  info("request_same_origin");
-  response.setStatusLine(metadata.httpVersion, 200, "OK");
-  response.setHeader("Content-Type", "text/plain", false);
-  response.setHeader("Cross-Origin-Opener-Policy", "same-origin", false);
-  let body = "foo";
-  response.bodyOutputStream.write(body, body.length);
-}
-
-function handler_same_origin_allow_outgoing(metadata, response)
-{
-  info("request_same_origin");
-  response.setStatusLine(metadata.httpVersion, 200, "OK");
-  response.setHeader("Content-Type", "text/plain", false);
-  response.setHeader("Cross-Origin-Opener-Policy", "same-origin unsafe-allow-outgoing", false);
-  let body = "foo";
-  response.bodyOutputStream.write(body, body.length);
-}
-
-function handler_same_site(metadata, response)
-{
-  info("request_same_site");
-  response.setStatusLine(metadata.httpVersion, 200, "OK");
-  response.setHeader("Content-Type", "text/plain", false);
-  response.setHeader("Cross-Origin-Opener-Policy", "same-site", false);
-  let body = "foo";
-  response.bodyOutputStream.write(body, body.length);
-}
-
-function handler_same_site_allow_outgoing(metadata, response)
-{
-  info("request_same_site");
-  response.setStatusLine(metadata.httpVersion, 200, "OK");
-  response.setHeader("Content-Type", "text/plain", false);
-  response.setHeader("Cross-Origin-Opener-Policy", "same-site unsafe-allow-outgoing", false);
-  let body = "foo";
-  response.bodyOutputStream.write(body, body.length);
-}
-
-add_task(async function test_setup() {
-  if (!inChildProcess()) {
-    Services.prefs.setCharPref("network.dns.localDomains", "foo.example.com, example.com, example.org");
-    registerCleanupFunction(function() {
-      Services.prefs.clearUserPref("network.dns.localDomains");
-    });
-  }
-
-  testServer = new HttpServer();
-  testServer.start(-1);
-  registerCleanupFunction(() => testServer.stop(() => {}));
-  testServer.registerPathHandler("/null", handler_null);
-  testServer.registerPathHandler("/same-origin", handler_same_origin);
-  testServer.registerPathHandler("/same-origin_allow-outgoing", handler_same_origin_allow_outgoing);
-  testServer.registerPathHandler("/same-site", handler_same_site);
-  testServer.registerPathHandler("/same-site_allow-outgoing", handler_same_site_allow_outgoing);
-  testServer.identity.setPrimary("http", "example.com", testServer.identity.primaryPort);
-});
-
-// policyA, originA, policyB, originB
-async function generate_test(policyA, originA, policyB, originB, expectedResult, contentPolicyType = Ci.nsIContentPolicy.TYPE_DOCUMENT) {
-  let listener = new OnStartListener((channel) => {
-    if (!inChildProcess()) {
-      equal(channel.hasCrossOriginOpenerPolicyMismatch(), expectedResult, `check for mismatch testing ${policyA}, ${originA}, ${policyB}, ${originB}, ${expectedResult}`);
-    }
-  });
-
-  let chan = NetUtil.newChannel({
-    uri: `${originB}:${testServer.identity.primaryPort}/${policyB}`,
-    loadUsingSystemPrincipal: true,
-    contentPolicyType: contentPolicyType,
-  }).QueryInterface(Ci.nsIHttpChannel);
-
-  if (policyA == "null") {
-    chan.loadInfo.openerPolicy = Ci.nsILoadInfo.OPENER_POLICY_NULL;
-  } else if (policyA == "same-origin") {
-    chan.loadInfo.openerPolicy = Ci.nsILoadInfo.OPENER_POLICY_SAME_ORIGIN;
-  } else if (policyA == "same-origin_allow-outgoing") {
-    chan.loadInfo.openerPolicy = Ci.nsILoadInfo.OPENER_POLICY_SAME_ORIGIN_ALLOW_OUTGOING;
-  } else if (policyA == "same-site") {
-    chan.loadInfo.openerPolicy = Ci.nsILoadInfo.OPENER_POLICY_SAME_SITE;
-  } else if (policyA == "same-site_allow-outgoing") {
-    chan.loadInfo.openerPolicy = Ci.nsILoadInfo.OPENER_POLICY_SAME_SITE_ALLOW_OUTGOING;
-  }
-
-  let principalA = Services.scriptSecurityManager.createNullPrincipal({});
-  if (originA != "about:blank") {
-    principalA = Services.scriptSecurityManager.createCodebasePrincipal(Services.io.newURI(`${originA}:${testServer.identity.primaryPort}/${policyA}`), {});
-  }
-
-  chan.QueryInterface(Ci.nsIHttpChannelInternal).setTopWindowPrincipal(principalA);
-  equal(chan.loadInfo.externalContentPolicyType, contentPolicyType);
-
-  if (inChildProcess()) {
-    do_send_remote_message("prepare-test", {"channelId": chan.channelId,
-                                            "policyA": policyA,
-                                            "originA": `${originA}`,
-                                            "policyB": policyB,
-                                            "originB": `${originB}`,
-                                            "expectedResult": expectedResult});
-    await do_await_remote_message("test-ready");
-  }
-
-  chan.asyncOpen2(listener);
-  return listener.done;
-}
-
-add_task(async function test_policies() {
-  // Note: This test only verifies that the result of
-  // nsIHttpChannel.hasCrossOriginOpenerPolicyMismatch() is correct. It does not
-  // check that the header is honored for auxiliary browsing contexts, how it
-  // affects a top-level browsing context opened from a sandboxed iframe,
-  // whether it affects the browsing context name, etc
-
-  await generate_test("null", "http://example.com", "null", "http://example.com", false);
-  await generate_test("null", "http://example.com", "same-origin", "http://example.com", true);
-  await generate_test("null", "http://example.com", "same-origin_allow-outgoing", "http://example.com", true);
-  await generate_test("null", "http://example.com", "same-site", "http://example.com", true);
-  await generate_test("null", "http://example.com", "same-site_allow-outgoing", "http://example.com", true);
-  await generate_test("null", "about:blank", "null", "http://example.com", false);
-  await generate_test("null", "about:blank", "same-origin", "http://example.com", true);
-  await generate_test("null", "about:blank", "same-origin_allow-outgoing", "http://example.com", true);
-  await generate_test("null", "about:blank", "same-site", "http://example.com", true);
-  await generate_test("null", "about:blank", "same-site_allow-outgoing", "http://example.com", true);
-
-  await generate_test("same-origin", "http://example.com", "null", "http://example.com", true);
-  await generate_test("same-origin_allow-outgoing", "http://example.com", "null", "http://example.com", true);
-  await generate_test("same-origin", "about:blank", "null", "http://example.com", true);
-  await generate_test("same-origin_allow-outgoing", "about:blank", "null", "http://example.com", false);
-  await generate_test("same-origin", "http://example.com", "same-origin", "http://example.com", false);
-  await generate_test("same-origin_allow-outgoing", "http://example.com", "same-origin", "http://example.com", true);
-  await generate_test("same-origin", "http://example.com", "same-origin_allow-outgoing", "http://example.com", true);
-  await generate_test("same-origin_allow-outgoing", "http://example.com", "same-origin_allow-outgoing", "http://example.com", false);
-  await generate_test("same-origin", "https://example.com", "same-origin", "http://example.com", true);
-  // true because policyB is not null
-  await generate_test("same-origin", "about:blank", "same-origin", "http://example.com", true);
-  await generate_test("same-origin_allow-outgoing", "about:blank", "same-origin", "http://example.com", true);
-  await generate_test("same-origin", "about:blank", "same-origin_allow-outgoing", "http://example.com", true);
-  await generate_test("same-origin_allow-outgoing", "about:blank", "same-origin_allow-outgoing", "http://example.com", true);
-  await generate_test("same-origin", "http://foo.example.com", "same-origin", "http://example.com", true);
-  await generate_test("same-origin_allow-outgoing", "http://foo.example.com", "same-origin", "http://example.com", true);
-  await generate_test("same-origin", "http://foo.example.com", "same-origin_allow-outgoing", "http://example.com", true);
-  await generate_test("same-origin_allow-outgoing", "http://foo.example.com", "same-origin_allow-outgoing", "http://example.com", true);
-  await generate_test("same-origin", "http://example.org", "same-origin", "http://example.com", true);
-  await generate_test("same-origin_allow-outgoing", "http://example.org", "same-origin", "http://example.com", true);
-  await generate_test("same-origin", "http://example.org", "same-origin_allow-outgoing", "http://example.com", true);
-  await generate_test("same-origin_allow-outgoing", "http://example.org", "same-origin_allow-outgoing", "http://example.com", true);
-  await generate_test("same-origin", "http://example.com", "same-site", "http://example.com", true);
-  await generate_test("same-origin_allow-outgoing", "http://example.com", "same-site", "http://example.com", true);
-  await generate_test("same-origin", "http://example.com", "same-site_allow-outgoing", "http://example.com", true);
-  await generate_test("same-origin_allow-outgoing", "http://example.com", "same-site_allow-outgoing", "http://example.com", true);
-
-  await generate_test("same-site", "http://example.com", "null", "http://example.com", true);
-  await generate_test("same-site_allow-outgoing", "http://example.com", "null", "http://example.com", true);
-  await generate_test("same-site", "about:blank", "null", "http://example.com", true);
-  await generate_test("same-site_allow-outgoing", "about:blank", "null", "http://example.com", false);
-  await generate_test("same-site", "http://example.com", "same-origin", "http://example.com", true);
-  await generate_test("same-site_allow-outgoing", "http://example.com", "same-origin", "http://example.com", true);
-  await generate_test("same-site", "http://example.com", "same-origin_allow-outgoing", "http://example.com", true);
-  await generate_test("same-site_allow-outgoing", "http://example.com", "same-origin_allow-outgoing", "http://example.com", true);
-  // true because policyB is not null
-  await generate_test("same-site", "about:blank", "same-origin", "http://example.com", true);
-  await generate_test("same-site_allow-outgoing", "about:blank", "same-origin", "http://example.com", true);
-  await generate_test("same-site", "about:blank", "same-origin_allow-outgoing", "http://example.com", true);
-  await generate_test("same-site_allow-outgoing", "about:blank", "same-origin_allow-outgoing", "http://example.com", true);
-  // true because they have different schemes
-  await generate_test("same-site", "https://example.com", "same-site", "http://example.com", true);
-  await generate_test("same-site_allow-outgoing", "https://example.com", "same-site", "http://example.com", true);
-  await generate_test("same-site", "https://example.com", "same-site_allow-outgoing", "http://example.com", true);
-  await generate_test("same-site_allow-outgoing", "https://example.com", "same-site_allow-outgoing", "http://example.com", true);
-
-  // These return false because the contentPolicyType is not TYPE_DOCUMENT
-  await generate_test("null", "http://example.com", "same-origin", "http://example.com", false, Ci.nsIContentPolicy.TYPE_OTHER);
-  await generate_test("same-origin", "http://example.com", "null", "http://example.com", false, Ci.nsIContentPolicy.TYPE_OTHER);
-
-  if (inChildProcess()) {
-    // send one message with no payload to clear the listener
-    info("finishing");
-    do_send_remote_message("prepare-test");
-    await do_await_remote_message("test-ready");
-  }
-});
--- a/netwerk/test/unit/xpcshell.ini
+++ b/netwerk/test/unit/xpcshell.ini
@@ -422,9 +422,8 @@ skip-if = os == "android" # CP service i
 run-sequentially = node server exceptions dont replay well
 [test_esni_dns_fetch.js]
 # http2-using tests require node available
 skip-if = os == "android"
 [test_network_connectivity_service.js]
 skip-if = os == "android" # DNSv6 issues on android
 [test_suspend_channel_on_authRetry.js]
 [test_suspend_channel_on_examine_merged_response.js]
-[test_crossOriginOpenerPolicy.js]
deleted file mode 100644
--- a/netwerk/test/unit_ipc/test_crossOriginOpenerPolicy_wrap.js
+++ /dev/null
@@ -1,47 +0,0 @@
-"use strict";
-
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
-
-// This holds information about the test that is currently running.
-// We can only call nsIHttpChannel.crossOriginOpenerPolicyMismatch
-// in the main process, so for each channel opened in the child process we need
-// to perform the check in the parent. We intercept it during onStartRequest
-// with the "http-on-examine-response" observer notification.
-let gData = null;
-
-function observer(subject, topic, state) {
-  info("observer called with " + topic);
-  let chan = subject.QueryInterface(Ci.nsIHttpChannel);
-  equal(chan.channelId, gData.channelId);
-  equal(chan.hasCrossOriginOpenerPolicyMismatch(), gData.expectedResult, `check for mismatch testing ${gData.policyA}, ${gData.originA}, ${gData.policyB}, ${gData.originB}, ${gData.expectedResult}`);
-}
-
-function waitForTest() {
-  do_await_remote_message("prepare-test").then((data) => {
-    info(`prepare test: ${data}`);
-    gData = data;
-    do_send_remote_message("test-ready");
-
-    // So we don't hang, the child must send a final message with no data
-    // so we can clear the listener. Otherwise we call waitForTest again.
-    if (!data) {
-      info("parent test finishing");
-      return;
-    }
-    waitForTest();
-  });
-}
-
-function run_test() {
-  Services.obs.addObserver(observer, "http-on-examine-response");
-  Services.prefs.setCharPref("network.dns.localDomains", "foo.example.com, example.com, example.org");
-
-  registerCleanupFunction(function() {
-    Services.prefs.clearUserPref("network.dns.localDomains");
-    Services.obs.removeObserver(observer, "http-on-examine-response");
-  });
-
-  waitForTest();
-
-  run_test_in_child("../unit/test_crossOriginOpenerPolicy.js");
-}
--- a/netwerk/test/unit_ipc/xpcshell.ini
+++ b/netwerk/test/unit_ipc/xpcshell.ini
@@ -52,17 +52,16 @@ support-files =
   !/netwerk/test/unit/data/test_readline8.txt
   !/netwerk/test/unit/data/signed_win.exe
   !/netwerk/test/unit/test_alt-data_simple.js
   !/netwerk/test/unit/test_alt-data_stream.js
   !/netwerk/test/unit/test_channel_priority.js
   !/netwerk/test/unit/test_multipart_streamconv.js
   !/netwerk/test/unit/test_original_sent_received_head.js
   !/netwerk/test/unit/test_alt-data_cross_process.js
-  !/netwerk/test/unit/test_crossOriginOpenerPolicy.js
   child_cookie_header.js
 
 [test_bug528292_wrap.js]
 [test_cookie_header_stripped.js]
 [test_cacheflags_wrap.js]
 [test_cache-entry-id_wrap.js]
 [test_cache_jar_wrap.js]
 [test_channel_close_wrap.js]
@@ -100,9 +99,8 @@ skip-if = true
 [test_alt-data_stream_wrap.js]
 [test_original_sent_received_head_wrap.js]
 [test_channel_id.js]
 [test_trackingProtection_annotateChannels_wrap1.js]
 [test_trackingProtection_annotateChannels_wrap2.js]
 [test_channel_priority_wrap.js]
 [test_multipart_streamconv_wrap.js]
 [test_alt-data_cross_process_wrap.js]
-[test_crossOriginOpenerPolicy_wrap.js]
--- a/toolkit/components/remotebrowserutils/tests/browser/browser.ini
+++ b/toolkit/components/remotebrowserutils/tests/browser/browser.ini
@@ -1,11 +1,9 @@
 [DEFAULT]
 run-if = e10s
 support-files =
   dummy_page.html
   print_postdata.sjs
   307redirect.sjs
-  coop_header.sjs
 
 [browser_RemoteWebNavigation.js]
 [browser_httpResponseProcessSelection.js]
-[browser_httpCrossOriginOpenerPolicy.js]
deleted file mode 100644
--- a/toolkit/components/remotebrowserutils/tests/browser/browser_httpCrossOriginOpenerPolicy.js
+++ /dev/null
@@ -1,51 +0,0 @@
-"use strict";
-
-const {E10SUtils} = ChromeUtils.import("resource://gre/modules/E10SUtils.jsm");
-
-const PREF_NAME = "browser.tabs.remote.useCrossOriginOpenerPolicy";
-
-function httpURL(filename, host = "https://example.com") {
-  let root = getRootDirectory(gTestPath)
-    .replace("chrome://mochitests/content", host);
-  return root + filename;
-}
-
-async function test_coop(start, target, expectedProcessSwitch) {
-  return BrowserTestUtils.withNewTab({
-    gBrowser, url: start,
-  }, async function(browser) {
-    info(`Test tab ready: ${start}`);
-
-    let firstProcessID = await ContentTask.spawn(browser, null, () => {
-      return Services.appinfo.processID;
-    });
-
-    info(`firstProcessID: ${firstProcessID}`);
-
-    BrowserTestUtils.loadURI(browser, target);
-    await BrowserTestUtils.browserLoaded(browser);
-
-    info(`Navigated to: ${target}`);
-    let secondProcessID = await ContentTask.spawn(browser, null, () => {
-      return Services.appinfo.processID;
-    });
-
-    is(firstProcessID != secondProcessID, expectedProcessSwitch, `from: ${start} to ${target}`);
-  });
-}
-
-add_task(async function test_disabled() {
-  await SpecialPowers.pushPrefEnv({set: [[PREF_NAME, false]]});
-  await test_coop(httpURL("coop_header.sjs", "https://example.com"), httpURL("coop_header.sjs", "https://example.com"), false);
-  await test_coop(httpURL("coop_header.sjs?same-origin", "http://example.com"), httpURL("coop_header.sjs", "http://example.com"), false);
-  await test_coop(httpURL("coop_header.sjs", "http://example.com"), httpURL("coop_header.sjs?same-origin", "http://example.com"), false);
-  await test_coop(httpURL("coop_header.sjs?same-origin", "http://example.com"), httpURL("coop_header.sjs?same-site", "http://example.com"), false); // assuming we don't have fission yet :)
-});
-
-add_task(async function test_enabled() {
-  await SpecialPowers.pushPrefEnv({set: [[PREF_NAME, true]]});
-  await test_coop(httpURL("coop_header.sjs", "https://example.com"), httpURL("coop_header.sjs", "https://example.com"), false);
-  await test_coop(httpURL("coop_header.sjs", "https://example.com"), httpURL("coop_header.sjs?same-origin", "https://example.org"), true);
-  await test_coop(httpURL("coop_header.sjs?same-origin", "https://example.com"), httpURL("coop_header.sjs", "https://example.org"), true);
-  await test_coop(httpURL("coop_header.sjs?same-origin", "https://example.com"), httpURL("coop_header.sjs?same-site", "https://example.org"), true);
-});
deleted file mode 100644
--- a/toolkit/components/remotebrowserutils/tests/browser/coop_header.sjs
+++ /dev/null
@@ -1,13 +0,0 @@
-function handleRequest(request, response)
-{
-  response.setStatusLine(request.httpVersion, 200, "OK");
-
-  let coop = request.queryString;
-  if (coop.length > 0) {
-    response.setHeader("Cross-Origin-Opener-Policy", unescape(coop), false);
-  }
-
-  response.setHeader("Content-Type", "text/html; charset=utf-8", false);
-
-  response.write("<!DOCTYPE html><html><body><p>Hello world</p></body></html>");
-}
--- a/toolkit/modules/E10SUtils.jsm
+++ b/toolkit/modules/E10SUtils.jsm
@@ -12,19 +12,16 @@ const {XPCOMUtils} = ChromeUtils.import(
 XPCOMUtils.defineLazyPreferenceGetter(this, "useSeparateFileUriProcess",
                                       "browser.tabs.remote.separateFileUriProcess", false);
 XPCOMUtils.defineLazyPreferenceGetter(this, "allowLinkedWebInFileUriProcess",
                                       "browser.tabs.remote.allowLinkedWebInFileUriProcess", false);
 XPCOMUtils.defineLazyPreferenceGetter(this, "useSeparatePrivilegedContentProcess",
                                       "browser.tabs.remote.separatePrivilegedContentProcess", false);
 XPCOMUtils.defineLazyPreferenceGetter(this, "useHttpResponseProcessSelection",
                                       "browser.tabs.remote.useHTTPResponseProcessSelection", false);
-XPCOMUtils.defineLazyPreferenceGetter(this, "useCrossOriginOpenerPolicy",
-                                      "browser.tabs.remote.useCrossOriginOpenerPolicy", false);
-
 ChromeUtils.defineModuleGetter(this, "Utils",
                                "resource://gre/modules/sessionstore/Utils.jsm");
 
 function getAboutModule(aURL) {
   // Needs to match NS_GetAboutModuleName
   let moduleName = aURL.pathQueryRef.replace(/[#?].*/, "").toLowerCase();
   let contract = "@mozilla.org/network/protocol/about;1?what=" + moduleName;
   try {
@@ -93,19 +90,16 @@ var E10SUtils = {
   FILE_REMOTE_TYPE,
   EXTENSION_REMOTE_TYPE,
   PRIVILEGED_REMOTE_TYPE,
   LARGE_ALLOCATION_REMOTE_TYPE,
 
   useHttpResponseProcessSelection() {
     return useHttpResponseProcessSelection;
   },
-  useCrossOriginOpenerPolicy() {
-    return useCrossOriginOpenerPolicy;
-  },
 
   canLoadURIInRemoteType(aURL, aRemoteType = DEFAULT_REMOTE_TYPE,
                          aPreferredRemoteType = undefined) {
     // We need a strict equality here because the value of `NOT_REMOTE` is
     // `null`, and there is a possibility that `undefined` is passed as an
     // argument, which might result a load in the parent process.
     if (aPreferredRemoteType === undefined) {
       aPreferredRemoteType = aRemoteType === NOT_REMOTE