Backed out 3 changesets (bug 1639247) for build bustages on on StoragePrincipalHelper.cpp. CLOSED TREE
authorRazvan Maries <rmaries@mozilla.com>
Wed, 20 May 2020 19:34:22 +0300
changeset 531276 b45a70689704ffc67766812444530cb15005eb45
parent 531275 8dba8b454ae100a6e7f5e2ea2745f6c19c928d7a
child 531277 a0d10a7e5c3f219e8346667b107cb02506cbbdd8
push id37436
push userncsoregi@mozilla.com
push dateWed, 20 May 2020 21:30:50 +0000
treeherdermozilla-central@6c10970490f3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1639247
milestone78.0a1
backs out48a854ee6710ee77fce1b7dc08799352d6ff3fdb
032d302608e4bcc7dcca45bf410041cdcb3a03f9
2d2ff22a0ea4db3fc95c2b22342e98a16a0fe7de
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 3 changesets (bug 1639247) for build bustages on on StoragePrincipalHelper.cpp. CLOSED TREE Backed out changeset 48a854ee6710 (bug 1639247) Backed out changeset 032d302608e4 (bug 1639247) Backed out changeset 2d2ff22a0ea4 (bug 1639247)
dom/base/nsContentSink.cpp
dom/html/nsHTMLDNSPrefetch.cpp
dom/html/nsHTMLDNSPrefetch.h
dom/webidl/NetDashboard.webidl
netwerk/base/Dashboard.cpp
netwerk/base/DashboardTypes.h
netwerk/dns/nsHostResolver.cpp
netwerk/protocol/http/TRRServiceChannel.cpp
netwerk/protocol/http/nsHttpChannel.cpp
toolkit/components/antitracking/StoragePrincipalHelper.cpp
toolkit/components/antitracking/StoragePrincipalHelper.h
toolkit/content/aboutNetworking.html
toolkit/content/aboutNetworking.js
toolkit/locales/en-US/toolkit/about/aboutNetworking.ftl
--- a/dom/base/nsContentSink.cpp
+++ b/dom/base/nsContentSink.cpp
@@ -13,17 +13,16 @@
 #include "mozilla/Components.h"
 #include "mozilla/PresShell.h"
 #include "mozilla/StaticPrefs_browser.h"
 #include "mozilla/StaticPrefs_content.h"
 #include "mozilla/dom/Document.h"
 #include "mozilla/dom/MutationObservers.h"
 #include "mozilla/css/Loader.h"
 #include "mozilla/dom/SRILogHelper.h"
-#include "mozilla/StoragePrincipalHelper.h"
 #include "nsStyleLinkElement.h"
 #include "nsIDocShell.h"
 #include "nsILoadContext.h"
 #include "nsIPrefetchService.h"
 #include "nsIURI.h"
 #include "nsNetUtil.h"
 #include "nsIMIMEHeaderParam.h"
 #include "nsIProtocolHandler.h"
@@ -849,21 +848,19 @@ void nsContentSink::PrefetchDNS(const ns
       nsAutoCString host;
       uri->GetHost(host);
       CopyUTF8toUTF16(host, hostname);
     }
     isHttps = uri->SchemeIs("https");
   }
 
   if (!hostname.IsEmpty() && nsHTMLDNSPrefetch::IsAllowed(mDocument)) {
-    OriginAttributes oa;
-    StoragePrincipalHelper::GetOriginAttributesForNetworkState(mDocument, oa);
-
-    nsHTMLDNSPrefetch::PrefetchLow(hostname, isHttps, oa,
-                                   mDocument->GetChannel()->GetTRRMode());
+    nsHTMLDNSPrefetch::PrefetchLow(
+        hostname, isHttps, mDocument->NodePrincipal()->OriginAttributesRef(),
+        mDocument->GetChannel()->GetTRRMode());
   }
 }
 
 void nsContentSink::Preconnect(const nsAString& aHref,
                                const nsAString& aCrossOrigin) {
   // construct URI using document charset
   auto encoding = mDocument->GetDocumentCharacterSet();
   nsCOMPtr<nsIURI> uri;
--- a/dom/html/nsHTMLDNSPrefetch.cpp
+++ b/dom/html/nsHTMLDNSPrefetch.cpp
@@ -5,17 +5,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsHTMLDNSPrefetch.h"
 
 #include "base/basictypes.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/net/NeckoCommon.h"
 #include "mozilla/net/NeckoChild.h"
-#include "mozilla/StoragePrincipalHelper.h"
 #include "nsURLHelper.h"
 
 #include "nsCOMPtr.h"
 #include "nsString.h"
 
 #include "nsNetUtil.h"
 #include "nsNetCID.h"
 #include "nsIProtocolHandler.h"
@@ -129,84 +128,78 @@ nsresult nsHTMLDNSPrefetch::PrefetchLow(
 nsresult nsHTMLDNSPrefetch::PrefetchMedium(Link* aElement) {
   return Prefetch(aElement, nsIDNSService::RESOLVE_PRIORITY_MEDIUM);
 }
 
 nsresult nsHTMLDNSPrefetch::PrefetchHigh(Link* aElement) {
   return Prefetch(aElement, 0);
 }
 
-nsresult nsHTMLDNSPrefetch::Prefetch(
-    const nsAString& hostname, bool isHttps,
-    const OriginAttributes& aPartitionedPrincipalOriginAttributes,
-    uint32_t flags) {
+nsresult nsHTMLDNSPrefetch::Prefetch(const nsAString& hostname, bool isHttps,
+                                     const OriginAttributes& aOriginAttributes,
+                                     uint32_t flags) {
   if (IsNeckoChild()) {
     // We need to check IsEmpty() because net_IsValidHostName()
     // considers empty strings to be valid hostnames
     if (!hostname.IsEmpty() &&
         net_IsValidHostName(NS_ConvertUTF16toUTF8(hostname))) {
       // during shutdown gNeckoChild might be null
       if (gNeckoChild) {
         gNeckoChild->SendHTMLDNSPrefetch(nsString(hostname), isHttps,
-                                         aPartitionedPrincipalOriginAttributes,
-                                         flags);
+                                         aOriginAttributes, flags);
       }
     }
     return NS_OK;
   }
 
   if (!(sInitialized && sPrefetches && sDNSListener) || !EnsureDNSService())
     return NS_ERROR_NOT_AVAILABLE;
 
   nsCOMPtr<nsICancelable> tmpOutstanding;
   nsresult rv = sDNSService->AsyncResolveNative(
       NS_ConvertUTF16toUTF8(hostname), flags | nsIDNSService::RESOLVE_SPECULATE,
-      sDNSListener, nullptr, aPartitionedPrincipalOriginAttributes,
-      getter_AddRefs(tmpOutstanding));
+      sDNSListener, nullptr, aOriginAttributes, getter_AddRefs(tmpOutstanding));
   if (NS_FAILED(rv)) {
     return rv;
   }
 
   // Fetch ESNI keys if needed.
   if (isHttps && sEsniEnabled) {
     nsAutoCString esniHost;
     esniHost.Append("_esni.");
     esniHost.Append(NS_ConvertUTF16toUTF8(hostname));
     Unused << sDNSService->AsyncResolveByTypeNative(
         esniHost, nsIDNSService::RESOLVE_TYPE_TXT,
         flags | nsIDNSService::RESOLVE_SPECULATE, sDNSListener, nullptr,
-        aPartitionedPrincipalOriginAttributes, getter_AddRefs(tmpOutstanding));
+        aOriginAttributes, getter_AddRefs(tmpOutstanding));
   }
 
   return NS_OK;
 }
 
 nsresult nsHTMLDNSPrefetch::PrefetchLow(
     const nsAString& hostname, bool isHttps,
-    const OriginAttributes& aPartitionedPrincipalOriginAttributes,
-    nsIRequest::TRRMode aMode) {
-  return Prefetch(hostname, isHttps, aPartitionedPrincipalOriginAttributes,
+    const OriginAttributes& aOriginAttributes, nsIRequest::TRRMode aMode) {
+  return Prefetch(hostname, isHttps, aOriginAttributes,
                   nsIDNSService::GetFlagsFromTRRMode(aMode) |
                       nsIDNSService::RESOLVE_PRIORITY_LOW);
 }
 
 nsresult nsHTMLDNSPrefetch::PrefetchMedium(
     const nsAString& hostname, bool isHttps,
-    const OriginAttributes& aPartitionedPrincipalOriginAttributes,
-    nsIRequest::TRRMode aMode) {
-  return Prefetch(hostname, isHttps, aPartitionedPrincipalOriginAttributes,
+    const OriginAttributes& aOriginAttributes, nsIRequest::TRRMode aMode) {
+  return Prefetch(hostname, isHttps, aOriginAttributes,
                   nsIDNSService::GetFlagsFromTRRMode(aMode) |
                       nsIDNSService::RESOLVE_PRIORITY_MEDIUM);
 }
 
 nsresult nsHTMLDNSPrefetch::PrefetchHigh(
     const nsAString& hostname, bool isHttps,
-    const OriginAttributes& aPartitionedPrincipalOriginAttributes,
-    nsIRequest::TRRMode aMode) {
-  return Prefetch(hostname, isHttps, aPartitionedPrincipalOriginAttributes,
+    const OriginAttributes& aOriginAttributes, nsIRequest::TRRMode aMode) {
+  return Prefetch(hostname, isHttps, aOriginAttributes,
                   nsIDNSService::GetFlagsFromTRRMode(aMode));
 }
 
 nsresult nsHTMLDNSPrefetch::CancelPrefetch(Link* aElement, uint32_t flags,
                                            nsresult aReason) {
   if (!(sInitialized && sPrefetches && sDNSListener) || !EnsureDNSService())
     return NS_ERROR_NOT_AVAILABLE;
 
@@ -217,78 +210,73 @@ nsresult nsHTMLDNSPrefetch::CancelPrefet
   NS_ENSURE_TRUE(element, NS_ERROR_FAILURE);
 
   nsAutoString protocol;
   aElement->GetProtocol(protocol);
   bool isHttps = false;
   if (protocol.EqualsLiteral("https:")) {
     isHttps = true;
   }
-
-  OriginAttributes oa;
-  StoragePrincipalHelper::GetOriginAttributesForNetworkState(
-      element->OwnerDoc(), oa);
-
-  return CancelPrefetch(hostname, isHttps, oa, flags, aReason);
+  return CancelPrefetch(hostname, isHttps,
+                        element->NodePrincipal()->OriginAttributesRef(), flags,
+                        aReason);
 }
 
 nsresult nsHTMLDNSPrefetch::CancelPrefetch(
     const nsAString& hostname, bool isHttps,
-    const OriginAttributes& aPartitionedPrincipalOriginAttributes,
-    uint32_t flags, nsresult aReason) {
+    const OriginAttributes& aOriginAttributes, uint32_t flags,
+    nsresult aReason) {
   // Forward this request to Necko Parent if we're a child process
   if (IsNeckoChild()) {
     // We need to check IsEmpty() because net_IsValidHostName()
     // considers empty strings to be valid hostnames
     if (!hostname.IsEmpty() &&
         net_IsValidHostName(NS_ConvertUTF16toUTF8(hostname))) {
       // during shutdown gNeckoChild might be null
       if (gNeckoChild) {
         gNeckoChild->SendCancelHTMLDNSPrefetch(
-            nsString(hostname), isHttps, aPartitionedPrincipalOriginAttributes,
-            flags, aReason);
+            nsString(hostname), isHttps, aOriginAttributes, flags, aReason);
       }
     }
     return NS_OK;
   }
 
   if (!(sInitialized && sPrefetches && sDNSListener) || !EnsureDNSService())
     return NS_ERROR_NOT_AVAILABLE;
 
   // Forward cancellation to DNS service
   nsresult rv = sDNSService->CancelAsyncResolveNative(
       NS_ConvertUTF16toUTF8(hostname), flags | nsIDNSService::RESOLVE_SPECULATE,
-      sDNSListener, aReason, aPartitionedPrincipalOriginAttributes);
+      sDNSListener, aReason, aOriginAttributes);
   // Cancel fetching ESNI keys if needed.
   if (sEsniEnabled && isHttps) {
     nsAutoCString esniHost;
     esniHost.Append("_esni.");
     esniHost.Append(NS_ConvertUTF16toUTF8(hostname));
     sDNSService->CancelAsyncResolveByTypeNative(
         esniHost, nsIDNSService::RESOLVE_TYPE_TXT,
         flags | nsIDNSService::RESOLVE_SPECULATE, sDNSListener, aReason,
-        aPartitionedPrincipalOriginAttributes);
+        aOriginAttributes);
   }
   return rv;
 }
 
 nsresult nsHTMLDNSPrefetch::CancelPrefetchLow(Link* aElement,
                                               nsresult aReason) {
   return CancelPrefetch(
       aElement,
       GetDNSFlagsFromLink(aElement) | nsIDNSService::RESOLVE_PRIORITY_LOW,
       aReason);
 }
 
 nsresult nsHTMLDNSPrefetch::CancelPrefetchLow(
     const nsAString& hostname, bool isHttps,
-    const OriginAttributes& aPartitionedPrincipalOriginAttributes,
-    nsIRequest::TRRMode aTRRMode, nsresult aReason) {
-  return CancelPrefetch(hostname, isHttps,
-                        aPartitionedPrincipalOriginAttributes,
+    const OriginAttributes& aOriginAttributes, nsIRequest::TRRMode aTRRMode,
+    nsresult aReason) {
+  return CancelPrefetch(hostname, isHttps, aOriginAttributes,
                         nsIDNSService::GetFlagsFromTRRMode(aTRRMode) |
                             nsIDNSService::RESOLVE_PRIORITY_LOW,
                         aReason);
 }
 
 void nsHTMLDNSPrefetch::LinkDestroyed(Link* aLink) {
   MOZ_ASSERT(aLink->IsInDNSPrefetch());
   if (sPrefetches) {
@@ -385,45 +373,46 @@ void nsHTMLDNSPrefetch::nsDeferrals::Sub
         if (hrefURI) {
           hrefURI->GetAsciiHost(hostName);
           rv = NS_URIChainHasFlags(hrefURI,
                                    nsIProtocolHandler::URI_IS_LOCAL_RESOURCE,
                                    &isLocalResource);
           isHttps = hrefURI->SchemeIs("https");
         }
 
-        OriginAttributes oa;
-        StoragePrincipalHelper::GetOriginAttributesForNetworkState(
-            element->OwnerDoc(), oa);
-
         if (!hostName.IsEmpty() && NS_SUCCEEDED(rv) && !isLocalResource &&
             element) {
           if (IsNeckoChild()) {
             // during shutdown gNeckoChild might be null
             if (gNeckoChild) {
-              gNeckoChild->SendHTMLDNSPrefetch(NS_ConvertUTF8toUTF16(hostName),
-                                               isHttps, oa,
-                                               mEntries[mTail].mFlags);
+              gNeckoChild->SendHTMLDNSPrefetch(
+                  NS_ConvertUTF8toUTF16(hostName), isHttps,
+                  element->NodePrincipal()->OriginAttributesRef(),
+                  mEntries[mTail].mFlags);
             }
           } else {
             nsCOMPtr<nsICancelable> tmpOutstanding;
 
             rv = sDNSService->AsyncResolveNative(
                 hostName,
                 mEntries[mTail].mFlags | nsIDNSService::RESOLVE_SPECULATE,
-                sDNSListener, nullptr, oa, getter_AddRefs(tmpOutstanding));
+                sDNSListener, nullptr,
+                element->NodePrincipal()->OriginAttributesRef(),
+                getter_AddRefs(tmpOutstanding));
             // Fetch ESNI keys if needed.
             if (NS_SUCCEEDED(rv) && sEsniEnabled && isHttps) {
               nsAutoCString esniHost;
               esniHost.Append("_esni.");
               esniHost.Append(hostName);
               sDNSService->AsyncResolveByTypeNative(
                   esniHost, nsIDNSService::RESOLVE_TYPE_TXT,
                   mEntries[mTail].mFlags | nsIDNSService::RESOLVE_SPECULATE,
-                  sDNSListener, nullptr, oa, getter_AddRefs(tmpOutstanding));
+                  sDNSListener, nullptr,
+                  element->NodePrincipal()->OriginAttributesRef(),
+                  getter_AddRefs(tmpOutstanding));
             }
             // Tell link that deferred prefetch was requested
             if (NS_SUCCEEDED(rv)) link->OnDNSPrefetchRequested();
           }
         }
       }
     }
 
--- a/dom/html/nsHTMLDNSPrefetch.h
+++ b/dom/html/nsHTMLDNSPrefetch.h
@@ -42,55 +42,50 @@ class nsHTMLDNSPrefetch {
 
   // Call one of the Prefetch* methods to start the lookup.
   //
   // The URI versions will defer DNS lookup until pageload is
   // complete, while the string versions submit the lookup to
   // the DNS system immediately. The URI version is somewhat lighter
   // weight, but its request is also more likely to be dropped due to a
   // full queue and it may only be used from the main thread.
-  //
-  // If you are planning to use the methods with the OriginAttributes param, be
-  // sure that you pass a partitioned one. See StoragePrincipalHelper.h to know
-  // more.
 
   static nsresult PrefetchHigh(mozilla::dom::Link* aElement);
   static nsresult PrefetchMedium(mozilla::dom::Link* aElement);
   static nsresult PrefetchLow(mozilla::dom::Link* aElement);
-  static nsresult PrefetchLow(
+  static nsresult PrefetchHigh(
       const nsAString& host, bool isHttps,
-      const mozilla::OriginAttributes& aPartitionedPrincipalOriginAttributes,
+      const mozilla::OriginAttributes& aOriginAttributes,
       nsIRequest::TRRMode aTRRMode);
   static nsresult PrefetchMedium(
       const nsAString& host, bool isHttps,
-      const mozilla::OriginAttributes& aPartitionedPrincipalOriginAttributes,
+      const mozilla::OriginAttributes& aOriginAttributes,
       nsIRequest::TRRMode aTRRMode);
-  static nsresult PrefetchHigh(
+  static nsresult PrefetchLow(
       const nsAString& host, bool isHttps,
-      const mozilla::OriginAttributes& aPartitionedPrincipalOriginAttributes,
+      const mozilla::OriginAttributes& aOriginAttributes,
       nsIRequest::TRRMode aTRRMode);
   static nsresult CancelPrefetchLow(
       const nsAString& host, bool isHttps,
-      const mozilla::OriginAttributes& aPartitionedPrincipalOriginAttributes,
+      const mozilla::OriginAttributes& aOriginAttributes,
       nsIRequest::TRRMode aTRRMode, nsresult aReason);
   static nsresult CancelPrefetchLow(mozilla::dom::Link* aElement,
                                     nsresult aReason);
 
   static void LinkDestroyed(mozilla::dom::Link* aLink);
 
  private:
-  static nsresult Prefetch(
-      const nsAString& host, bool isHttps,
-      const mozilla::OriginAttributes& aPartitionedPrincipalOriginAttributes,
-      uint32_t flags);
+  static nsresult Prefetch(const nsAString& host, bool isHttps,
+                           const mozilla::OriginAttributes& aOriginAttributes,
+                           uint32_t flags);
   static nsresult Prefetch(mozilla::dom::Link* aElement, uint32_t flags);
   static nsresult CancelPrefetch(
       const nsAString& hostname, bool isHttps,
-      const mozilla::OriginAttributes& aPartitionedPrincipalOriginAttributes,
-      uint32_t flags, nsresult aReason);
+      const mozilla::OriginAttributes& aOriginAttributes, uint32_t flags,
+      nsresult aReason);
   static nsresult CancelPrefetch(mozilla::dom::Link* aElement, uint32_t flags,
                                  nsresult aReason);
 
  public:
   class nsListener final : public nsIDNSListener {
     // This class exists to give a safe callback no-op DNSListener
    public:
     NS_DECL_THREADSAFE_ISUPPORTS
--- a/dom/webidl/NetDashboard.webidl
+++ b/dom/webidl/NetDashboard.webidl
@@ -61,17 +61,16 @@ dictionary WebSocketDict {
 };
 
 dictionary DnsCacheEntry {
   DOMString hostname = "";
   sequence<DOMString> hostaddr;
   DOMString family = "";
   double expiration = 0;
   boolean trr = false;
-  DOMString originAttributesSuffix = "";
 };
 
 [GenerateConversionToJS]
 dictionary DNSCacheDict {
   sequence<DnsCacheEntry> entries;
 };
 
 [GenerateConversionToJS]
--- a/netwerk/base/Dashboard.cpp
+++ b/netwerk/base/Dashboard.cpp
@@ -665,19 +665,16 @@ nsresult Dashboard::GetDNSCacheEntries(D
       CopyASCIItoUTF16(dnsData->mData[i].hostaddr[j], *addr);
     }
 
     if (dnsData->mData[i].family == PR_AF_INET6) {
       entry.mFamily.AssignLiteral(u"ipv6");
     } else {
       entry.mFamily.AssignLiteral(u"ipv4");
     }
-
-    entry.mOriginAttributesSuffix =
-        NS_ConvertUTF8toUTF16(dnsData->mData[i].originAttributesSuffix);
   }
 
   JS::RootedValue val(cx);
   if (!ToJSValue(cx, dict, &val)) {
     return NS_ERROR_FAILURE;
   }
   dnsData->mCallback->OnDashboardDataAvailable(val);
 
--- a/netwerk/base/DashboardTypes.h
+++ b/netwerk/base/DashboardTypes.h
@@ -27,17 +27,16 @@ struct HalfOpenSockets {
 
 struct DNSCacheEntries {
   nsCString hostname;
   nsTArray<nsCString> hostaddr;
   uint16_t family;
   int64_t expiration;
   nsCString netInterface;
   bool TRR;
-  nsCString originAttributesSuffix;
 };
 
 struct HttpConnInfo {
   uint32_t ttl;
   uint32_t rtt;
   nsString protocolVersion;
 
   void SetHTTPProtocolVersion(HttpVersion pv);
--- a/netwerk/dns/nsHostResolver.cpp
+++ b/netwerk/dns/nsHostResolver.cpp
@@ -2295,16 +2295,14 @@ void nsHostResolver::GetDNSCacheEntries(
         addrElement = addrElement->getNext();
         if (addrElement) {
           addr = &addrElement->mAddress;
         }
       }
       info.TRR = addrRec->addr_info->IsTRR();
     }
 
-    info.originAttributesSuffix = iter.Key().originSuffix;
-
     args->AppendElement(std::move(info));
   }
 }
 
 #undef LOG
 #undef LOG_ENABLED
--- a/netwerk/protocol/http/TRRServiceChannel.cpp
+++ b/netwerk/protocol/http/TRRServiceChannel.cpp
@@ -5,17 +5,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 "TRRServiceChannel.h"
 
 #include "HttpLog.h"
 #include "AltServiceChild.h"
 #include "mozilla/StaticPrefs_network.h"
-#include "mozilla/Unused.h"
 #include "nsDNSPrefetch.h"
 #include "nsEscape.h"
 #include "nsHttpTransaction.h"
 #include "nsICancelable.h"
 #include "nsIHttpPushListener.h"
 #include "nsIProtocolProxyService2.h"
 #include "nsIOService.h"
 #include "nsISeekableStream.h"
@@ -299,24 +298,22 @@ nsresult TRRServiceChannel::BeginConnect
   nsAutoCString host;
   nsAutoCString scheme;
   int32_t port = -1;
   bool isHttps = mURI->SchemeIs("https");
 
   rv = mURI->GetScheme(scheme);
   if (NS_SUCCEEDED(rv)) rv = mURI->GetAsciiHost(host);
   if (NS_SUCCEEDED(rv)) rv = mURI->GetPort(&port);
+  if (NS_SUCCEEDED(rv)) mURI->GetUsername(mUsername);
   if (NS_SUCCEEDED(rv)) rv = mURI->GetAsciiSpec(mSpec);
   if (NS_FAILED(rv)) {
     return rv;
   }
 
-  // Just a warning here because some nsIURIs do not implement this method.
-  Unused << NS_WARN_IF(NS_FAILED(mURI->GetUsername(mUsername)));
-
   // Reject the URL if it doesn't specify a host
   if (host.IsEmpty()) {
     rv = NS_ERROR_MALFORMED_URI;
     return rv;
   }
   LOG(("host=%s port=%d\n", host.get(), port));
   LOG(("uri=%s\n", mSpec.get()));
 
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -6735,24 +6735,22 @@ nsresult nsHttpChannel::BeginConnect() {
   nsAutoCString host;
   nsAutoCString scheme;
   int32_t port = -1;
   bool isHttps = mURI->SchemeIs("https");
 
   rv = mURI->GetScheme(scheme);
   if (NS_SUCCEEDED(rv)) rv = mURI->GetAsciiHost(host);
   if (NS_SUCCEEDED(rv)) rv = mURI->GetPort(&port);
+  if (NS_SUCCEEDED(rv)) mURI->GetUsername(mUsername);
   if (NS_SUCCEEDED(rv)) rv = mURI->GetAsciiSpec(mSpec);
   if (NS_FAILED(rv)) {
     return rv;
   }
 
-  // Just a warning here because some nsIURIs do not implement this method.
-  Unused << NS_WARN_IF(NS_FAILED(mURI->GetUsername(mUsername)));
-
   // Reject the URL if it doesn't specify a host
   if (host.IsEmpty()) {
     rv = NS_ERROR_MALFORMED_URI;
     return rv;
   }
   LOG(("host=%s port=%d\n", host.get(), port));
   LOG(("uri=%s\n", mSpec.get()));
 
@@ -6987,18 +6985,18 @@ nsresult nsHttpChannel::MaybeStartDNSPre
   LOG(
       ("nsHttpChannel::MaybeStartDNSPrefetch [this=%p, strategy=%u] "
        "prefetching%s\n",
        this, dnsStrategy,
        mCaps & NS_HTTP_REFRESH_DNS ? ", refresh requested" : ""));
 
   if (dnsStrategy & DNS_PREFETCH_ORIGIN) {
     OriginAttributes originAttributes;
-    StoragePrincipalHelper::GetOriginAttributesForNetworkState(
-        this, originAttributes);
+    StoragePrincipalHelper::GetOriginAttributes(
+        this, originAttributes, StoragePrincipalHelper::eRegularPrincipal);
 
     mDNSPrefetch = new nsDNSPrefetch(
         mURI, originAttributes, nsIRequest::GetTRRMode(), this, mTimingEnabled);
     nsresult rv = mDNSPrefetch->PrefetchHigh(mCaps & NS_HTTP_REFRESH_DNS);
 
     if (dnsStrategy & DNS_BLOCK_ON_ORIGIN_RESOLVE) {
       LOG(("  blocking on prefetching origin"));
 
--- a/toolkit/components/antitracking/StoragePrincipalHelper.cpp
+++ b/toolkit/components/antitracking/StoragePrincipalHelper.cpp
@@ -260,29 +260,9 @@ bool StoragePrincipalHelper::GetRegularP
   if (!loadContext) {
     return false;
   }
 
   loadContext->GetOriginAttributes(aAttributes);
   return true;
 }
 
-// static
-bool StoragePrincipalHelper::GetOriginAttributesForNetworkState(
-    nsIChannel* aChannel, OriginAttributes& aAttributes) {
-  return StoragePrincipalHelper::GetOriginAttributes(
-      aChannel, aAttributes,
-      StaticPrefs::privacy_partition_network_state() ? ePartitionedPrincipal
-                                                     : eRegularPrincipal);
-}
-
-// static
-void StoragePrincipalHelper::GetOriginAttributesForNetworkState(
-    Document* aDocument, OriginAttributes& aAttributes) {
-  if (!StaticPrefs::privacy_partition_network_state()) {
-    aAttributes = aDocument->NodePrincipal()->OriginAttributesRef();
-    return;
-  }
-
-  aAttributes = aDocument->IntrinsicStoragePrincipal()->OriginAttributesRef();
-}
-
 }  // namespace mozilla
--- a/toolkit/components/antitracking/StoragePrincipalHelper.h
+++ b/toolkit/components/antitracking/StoragePrincipalHelper.h
@@ -245,20 +245,13 @@ class StoragePrincipalHelper final {
                                   OriginAttributes& aAttributes,
                                   PrincipalType aPrincipalType);
 
   static bool GetRegularPrincipalOriginAttributes(
       dom::Document* aDocument, OriginAttributes& aAttributes);
 
   static bool GetRegularPrincipalOriginAttributes(
       nsILoadGroup* aLoadGroup, OriginAttributes& aAttributes);
-
-  // These methods return the correct originAttributes to be used for network
-  // state components (HSTS, network cache, image-cache, and so on).
-  static bool GetOriginAttributesForNetworkState(nsIChannel* aChanel,
-                                                 OriginAttributes& aAttributes);
-  static void GetOriginAttributesForNetworkState(dom::Document* aDocument,
-                                                 OriginAttributes& aAttributes);
 };
 
 }  // namespace mozilla
 
 #endif  // mozilla_StoragePrincipalHelper_h
--- a/toolkit/content/aboutNetworking.html
+++ b/toolkit/content/aboutNetworking.html
@@ -97,17 +97,16 @@
               <table>
                   <thead>
                       <tr>
                           <th data-l10n-id="about-networking-hostname"/>
                           <th data-l10n-id="about-networking-family"/>
                           <th data-l10n-id="about-networking-trr"/>
                           <th data-l10n-id="about-networking-addresses"/>
                           <th data-l10n-id="about-networking-expires"/>
-                          <th data-l10n-id="about-networking-originAttributesSuffix"/>
                       </tr>
                   </thead>
                   <tbody id="dns_content" />
               </table>
           </div>
 
           <div id="websockets" class="tab" hidden="true">
               <table>
--- a/toolkit/content/aboutNetworking.js
+++ b/toolkit/content/aboutNetworking.js
@@ -119,17 +119,16 @@ function displayDns(data) {
 
     for (let j = 0; j < data.entries[i].hostaddr.length; j++) {
       column.appendChild(document.createTextNode(data.entries[i].hostaddr[j]));
       column.appendChild(document.createElement("br"));
     }
 
     row.appendChild(column);
     row.appendChild(col(data.entries[i].expiration));
-    row.appendChild(col(data.entries[i].originAttributesSuffix));
     new_cont.appendChild(row);
   }
 
   parent.replaceChild(new_cont, cont);
 }
 
 function displayWebsockets(data) {
   let cont = document.getElementById("websockets_content");
--- a/toolkit/locales/en-US/toolkit/about/aboutNetworking.ftl
+++ b/toolkit/locales/en-US/toolkit/about/aboutNetworking.ftl
@@ -19,17 +19,16 @@ about-networking-idle = Idle
 about-networking-host = Host
 about-networking-tcp = TCP
 about-networking-sent = Sent
 about-networking-received = Received
 about-networking-family = Family
 about-networking-trr = TRR
 about-networking-addresses = Addresses
 about-networking-expires = Expires (Seconds)
-about-networking-originAttributesSuffix = Isolation Key
 about-networking-messages-sent = Messages Sent
 about-networking-messages-received = Messages Received
 about-networking-bytes-sent = Bytes Sent
 about-networking-bytes-received = Bytes Received
 about-networking-logging = Logging
 about-networking-log-tutorial =
     See <a data-l10n-name="logging">HTTP Logging</a>
     for instructions on how to use this tool.