Bug 1687618 - Remove topWindowOrigin from nsHttpConnectionInfo r=necko-reviewers,dragana
☠☠ backed out by 5ef38ba23902 ☠ ☠
authorValentin Gosu <valentin.gosu@gmail.com>
Mon, 25 Jan 2021 21:55:38 +0000
changeset 564630 0cb1cb5bf7a82e732f02b7db0fede20b8e930ce5
parent 564629 5308d27acd05f5bb1274babb75e57bec68b5c1f0
child 564631 b67677b3f710d46f8d99a57c9b767e4ab645a6d1
push id38144
push usercbrindusan@mozilla.com
push dateTue, 26 Jan 2021 15:55:19 +0000
treeherdermozilla-central@5ca936ea4848 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnecko-reviewers, dragana
bugs1687618
milestone87.0a1
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
Bug 1687618 - Remove topWindowOrigin from nsHttpConnectionInfo r=necko-reviewers,dragana Depends on D102712 Differential Revision: https://phabricator.services.mozilla.com/D102713
netwerk/protocol/http/AltServiceChild.cpp
netwerk/protocol/http/AlternateServices.cpp
netwerk/protocol/http/Http2Session.cpp
netwerk/protocol/http/TRRServiceChannel.cpp
netwerk/protocol/http/nsHttpChannel.cpp
netwerk/protocol/http/nsHttpConnectionInfo.cpp
netwerk/protocol/http/nsHttpConnectionInfo.h
netwerk/protocol/http/nsHttpHandler.cpp
--- a/netwerk/protocol/http/AltServiceChild.cpp
+++ b/netwerk/protocol/http/AltServiceChild.cpp
@@ -62,17 +62,17 @@ void AltServiceChild::ClearHostMapping(n
   auto task = [ci{std::move(ci)}]() {
     if (!EnsureAltServiceChild()) {
       return;
     }
 
     if (!ci->GetOrigin().IsEmpty() && sAltServiceChild->CanSend()) {
       Unused << sAltServiceChild->SendClearHostMapping(
           ci->GetOrigin(), ci->OriginPort(), ci->GetOriginAttributes(),
-          ci->GetTopWindowOrigin());
+          ""_ns /* topWindowOrigin */);
     }
   };
 
   if (!NS_IsMainThread()) {
     MOZ_ALWAYS_SUCCEEDS(NS_DispatchToMainThread(NS_NewRunnableFunction(
         "net::AltServiceChild::ClearHostMapping", task)));
     return;
   }
--- a/netwerk/protocol/http/AlternateServices.cpp
+++ b/netwerk/protocol/http/AlternateServices.cpp
@@ -357,18 +357,18 @@ bool AltSvcMapping::RouteEquals(AltSvcMa
          (mAlternatePort == map->mAlternatePort) &&
          mNPNToken.Equals(map->mNPNToken);
 }
 
 void AltSvcMapping::GetConnectionInfo(
     nsHttpConnectionInfo** outCI, nsProxyInfo* pi,
     const OriginAttributes& originAttributes) {
   RefPtr<nsHttpConnectionInfo> ci = new nsHttpConnectionInfo(
-      mOriginHost, mOriginPort, mNPNToken, mUsername, mTopWindowOrigin, pi,
-      originAttributes, mAlternateHost, mAlternatePort, mIsHttp3);
+      mOriginHost, mOriginPort, mNPNToken, mUsername, pi, originAttributes,
+      mAlternateHost, mAlternatePort, mIsHttp3);
 
   // http:// without the mixed-scheme attribute needs to be segmented in the
   // connection manager connection information hash with this attribute
   if (!mHttps && !mMixedScheme) {
     ci->SetInsecureScheme(true);
   }
   ci->SetPrivate(mPrivate);
   ci.forget(outCI);
@@ -1252,17 +1252,17 @@ void AltSvcCache::ClearHostMapping(const
       }
     }
   }
 }
 
 void AltSvcCache::ClearHostMapping(nsHttpConnectionInfo* ci) {
   if (!ci->GetOrigin().IsEmpty()) {
     ClearHostMapping(ci->GetOrigin(), ci->OriginPort(),
-                     ci->GetOriginAttributes(), ci->GetTopWindowOrigin());
+                     ci->GetOriginAttributes(), ""_ns /* topWindowOrigin */);
   }
 }
 
 void AltSvcCache::ClearAltServiceMappings() {
   MOZ_ASSERT(NS_IsMainThread());
   if (mStorage) {
     mStorage->Clear();
   }
--- a/netwerk/protocol/http/Http2Session.cpp
+++ b/netwerk/protocol/http/Http2Session.cpp
@@ -2379,24 +2379,24 @@ class UpdateAltSvcEvent : public Runnabl
     }
     uri->GetScheme(originScheme);
     uri->GetHost(originHost);
     uri->GetPort(&originPort);
 
     if (XRE_IsSocketProcess()) {
       AltServiceChild::ProcessHeader(
           mHeader, originScheme, originHost, originPort, mCI->GetUsername(),
-          mCI->GetTopWindowOrigin(), mCI->GetPrivate(), false, mCallbacks,
+          ""_ns /* topWindowOrigin*/, mCI->GetPrivate(), false, mCallbacks,
           mCI->ProxyInfo(), 0, mCI->GetOriginAttributes());
       return NS_OK;
     }
 
     AltSvcMapping::ProcessHeader(
         mHeader, originScheme, originHost, originPort, mCI->GetUsername(),
-        mCI->GetTopWindowOrigin(), mCI->GetPrivate(), false, nullptr,
+        ""_ns /* topWindowOrigin*/, mCI->GetPrivate(), false, nullptr,
         mCI->ProxyInfo(), 0, mCI->GetOriginAttributes());
     return NS_OK;
   }
 
  private:
   nsCString mHeader;
   nsCString mOrigin;
   RefPtr<nsHttpConnectionInfo> mCI;
--- a/netwerk/protocol/http/TRRServiceChannel.cpp
+++ b/netwerk/protocol/http/TRRServiceChannel.cpp
@@ -386,18 +386,17 @@ nsresult TRRServiceChannel::BeginConnect
 
   nsCOMPtr<nsProxyInfo> proxyInfo;
   if (mProxyInfo) proxyInfo = do_QueryInterface(mProxyInfo);
 
   mRequestHead.SetHTTPS(isHttps);
   mRequestHead.SetOrigin(scheme, host, port);
 
   RefPtr<nsHttpConnectionInfo> connInfo = new nsHttpConnectionInfo(
-      host, port, ""_ns, mUsername, GetTopWindowOrigin(), proxyInfo,
-      OriginAttributes(), isHttps);
+      host, port, ""_ns, mUsername, proxyInfo, OriginAttributes(), isHttps);
   // TODO: Bug 1622778 for using AltService in socket process.
   StoreAllowAltSvc(XRE_IsParentProcess() && LoadAllowAltSvc());
   bool http2Allowed = !gHttpHandler->IsHttp2Excluded(connInfo);
   bool http3Allowed = !mUpgradeProtocolCallback && !mProxyInfo &&
                       !(mCaps & NS_HTTP_BE_CONSERVATIVE) &&
                       !LoadBeConservative();
 
   RefPtr<AltSvcMapping> mapping;
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -6569,18 +6569,17 @@ nsresult nsHttpChannel::BeginConnect() {
     StoreAllowHttp3(false);
   }
 
   gHttpHandler->MaybeAddAltSvcForTesting(mURI, mUsername, GetTopWindowOrigin(),
                                          mPrivateBrowsing, IsIsolated(),
                                          mCallbacks, originAttributes);
 
   RefPtr<nsHttpConnectionInfo> connInfo = new nsHttpConnectionInfo(
-      host, port, ""_ns, mUsername, GetTopWindowOrigin(), proxyInfo,
-      originAttributes, isHttps);
+      host, port, ""_ns, mUsername, proxyInfo, originAttributes, isHttps);
   bool http2Allowed = !gHttpHandler->IsHttp2Excluded(connInfo);
   if (!LoadAllowHttp3()) {
     mCaps |= NS_HTTP_DISALLOW_HTTP3;
   }
   bool http3Allowed = !mUpgradeProtocolCallback && !mProxyInfo &&
                       !(mCaps & NS_HTTP_BE_CONSERVATIVE) &&
                       !LoadBeConservative() && LoadAllowHttp3();
 
--- a/netwerk/protocol/http/nsHttpConnectionInfo.cpp
+++ b/netwerk/protocol/http/nsHttpConnectionInfo.cpp
@@ -42,51 +42,48 @@ static nsresult SHA256(const char* aPlai
 }
 
 namespace mozilla {
 namespace net {
 
 nsHttpConnectionInfo::nsHttpConnectionInfo(
     const nsACString& originHost, int32_t originPort,
     const nsACString& npnToken, const nsACString& username,
-    const nsACString& topWindowOrigin, nsProxyInfo* proxyInfo,
-    const OriginAttributes& originAttributes, bool endToEndSSL, bool aIsHttp3)
+    nsProxyInfo* proxyInfo, const OriginAttributes& originAttributes,
+    bool endToEndSSL, bool aIsHttp3)
     : mRoutedPort(443), mLessThanTls13(false) {
-  Init(originHost, originPort, npnToken, username, topWindowOrigin, proxyInfo,
-       originAttributes, endToEndSSL, aIsHttp3);
+  Init(originHost, originPort, npnToken, username, proxyInfo, originAttributes,
+       endToEndSSL, aIsHttp3);
 }
 
 nsHttpConnectionInfo::nsHttpConnectionInfo(
     const nsACString& originHost, int32_t originPort,
     const nsACString& npnToken, const nsACString& username,
-    const nsACString& topWindowOrigin, nsProxyInfo* proxyInfo,
-    const OriginAttributes& originAttributes, const nsACString& routedHost,
-    int32_t routedPort, bool aIsHttp3)
+    nsProxyInfo* proxyInfo, const OriginAttributes& originAttributes,
+    const nsACString& routedHost, int32_t routedPort, bool aIsHttp3)
     : mLessThanTls13(false) {
   mEndToEndSSL = true;  // so DefaultPort() works
   mRoutedPort = routedPort == -1 ? DefaultPort() : routedPort;
 
   if (!originHost.Equals(routedHost) || (originPort != routedPort)) {
     mRoutedHost = routedHost;
   }
-  Init(originHost, originPort, npnToken, username, topWindowOrigin, proxyInfo,
-       originAttributes, true, aIsHttp3);
+  Init(originHost, originPort, npnToken, username, proxyInfo, originAttributes,
+       true, aIsHttp3);
 }
 
 void nsHttpConnectionInfo::Init(const nsACString& host, int32_t port,
                                 const nsACString& npnToken,
                                 const nsACString& username,
-                                const nsACString& topWindowOrigin,
                                 nsProxyInfo* proxyInfo,
                                 const OriginAttributes& originAttributes,
                                 bool e2eSSL, bool aIsHttp3) {
   LOG(("Init nsHttpConnectionInfo @%p\n", this));
 
   mUsername = username;
-  mTopWindowOrigin = topWindowOrigin;
   mProxyInfo = proxyInfo;
   mEndToEndSSL = e2eSSL;
   mUsingConnect = false;
   mNPNToken = npnToken;
   mIsHttp3 = aIsHttp3;
   mOriginAttributes = originAttributes;
   mTlsFlags = 0x0;
   mIsTrrServiceChannel = false;
@@ -280,23 +277,23 @@ void nsHttpConnectionInfo::SetOriginServ
 
 // Note that this function needs to be synced with
 // nsHttpConnectionInfo::DeserializeHttpConnectionInfoCloneArgs to make sure
 // nsHttpConnectionInfo can be serialized/deserialized.
 already_AddRefed<nsHttpConnectionInfo> nsHttpConnectionInfo::Clone() const {
   RefPtr<nsHttpConnectionInfo> clone;
   if (mRoutedHost.IsEmpty()) {
     clone = new nsHttpConnectionInfo(mOrigin, mOriginPort, mNPNToken, mUsername,
-                                     mTopWindowOrigin, mProxyInfo,
-                                     mOriginAttributes, mEndToEndSSL, mIsHttp3);
+                                     mProxyInfo, mOriginAttributes,
+                                     mEndToEndSSL, mIsHttp3);
   } else {
     MOZ_ASSERT(mEndToEndSSL);
-    clone = new nsHttpConnectionInfo(
-        mOrigin, mOriginPort, mNPNToken, mUsername, mTopWindowOrigin,
-        mProxyInfo, mOriginAttributes, mRoutedHost, mRoutedPort, mIsHttp3);
+    clone = new nsHttpConnectionInfo(mOrigin, mOriginPort, mNPNToken, mUsername,
+                                     mProxyInfo, mOriginAttributes, mRoutedHost,
+                                     mRoutedPort, mIsHttp3);
   }
 
   // Make sure the anonymous, insecure-scheme, and private flags are transferred
   clone->SetAnonymous(GetAnonymous());
   clone->SetPrivate(GetPrivate());
   clone->SetInsecureScheme(GetInsecureScheme());
   clone->SetNoSpdy(GetNoSpdy());
   clone->SetBeConservative(GetBeConservative());
@@ -332,23 +329,23 @@ nsHttpConnectionInfo::CloneAndAdoptHTTPS
 
   LOG(("HTTPSSVC: use new routed host (%s) and new npnToken (%s)", name.get(),
        alpn ? Get<0>(*alpn).get() : "None"));
 
   RefPtr<nsHttpConnectionInfo> clone;
   if (name.IsEmpty()) {
     clone = new nsHttpConnectionInfo(
         mOrigin, mOriginPort, alpn ? Get<0>(*alpn) : EmptyCString(), mUsername,
-        mTopWindowOrigin, mProxyInfo, mOriginAttributes, mEndToEndSSL, isHttp3);
+        mProxyInfo, mOriginAttributes, mEndToEndSSL, isHttp3);
   } else {
     MOZ_ASSERT(mEndToEndSSL);
-    clone = new nsHttpConnectionInfo(
-        mOrigin, mOriginPort, alpn ? Get<0>(*alpn) : EmptyCString(), mUsername,
-        mTopWindowOrigin, mProxyInfo, mOriginAttributes, name,
-        port ? *port : mOriginPort, isHttp3);
+    clone = new nsHttpConnectionInfo(mOrigin, mOriginPort,
+                                     alpn ? Get<0>(*alpn) : EmptyCString(),
+                                     mUsername, mProxyInfo, mOriginAttributes,
+                                     name, port ? *port : mOriginPort, isHttp3);
   }
 
   // Make sure the anonymous, insecure-scheme, and private flags are transferred
   clone->SetAnonymous(GetAnonymous());
   clone->SetPrivate(GetPrivate());
   clone->SetInsecureScheme(GetInsecureScheme());
   clone->SetNoSpdy(GetNoSpdy());
   clone->SetBeConservative(GetBeConservative());
@@ -387,17 +384,16 @@ void nsHttpConnectionInfo::SerializeHttp
   aArgs.insecureScheme() = aInfo->GetInsecureScheme();
   aArgs.noSpdy() = aInfo->GetNoSpdy();
   aArgs.beConservative() = aInfo->GetBeConservative();
   aArgs.tlsFlags() = aInfo->GetTlsFlags();
   aArgs.isTrrServiceChannel() = aInfo->GetTRRMode();
   aArgs.trrMode() = aInfo->GetTRRMode();
   aArgs.isIPv4Disabled() = aInfo->GetIPv4Disabled();
   aArgs.isIPv6Disabled() = aInfo->GetIPv6Disabled();
-  aArgs.topWindowOrigin() = aInfo->GetTopWindowOrigin();
   aArgs.isHttp3() = aInfo->IsHttp3();
   aArgs.hasIPHintAddress() = aInfo->HasIPHintAddress();
   aArgs.echConfig() = aInfo->GetEchConfig();
 
   if (!aInfo->ProxyInfo()) {
     return;
   }
 
@@ -411,26 +407,24 @@ void nsHttpConnectionInfo::SerializeHttp
 already_AddRefed<nsHttpConnectionInfo>
 nsHttpConnectionInfo::DeserializeHttpConnectionInfoCloneArgs(
     const HttpConnectionInfoCloneArgs& aInfoArgs) {
   nsProxyInfo* pi = nsProxyInfo::DeserializeProxyInfo(aInfoArgs.proxyInfo());
   RefPtr<nsHttpConnectionInfo> cinfo;
   if (aInfoArgs.routedHost().IsEmpty()) {
     cinfo = new nsHttpConnectionInfo(
         aInfoArgs.host(), aInfoArgs.port(), aInfoArgs.npnToken(),
-        aInfoArgs.username(), aInfoArgs.topWindowOrigin(), pi,
-        aInfoArgs.originAttributes(), aInfoArgs.endToEndSSL(),
-        aInfoArgs.isHttp3());
+        aInfoArgs.username(), pi, aInfoArgs.originAttributes(),
+        aInfoArgs.endToEndSSL(), aInfoArgs.isHttp3());
   } else {
     MOZ_ASSERT(aInfoArgs.endToEndSSL());
     cinfo = new nsHttpConnectionInfo(
         aInfoArgs.host(), aInfoArgs.port(), aInfoArgs.npnToken(),
-        aInfoArgs.username(), aInfoArgs.topWindowOrigin(), pi,
-        aInfoArgs.originAttributes(), aInfoArgs.routedHost(),
-        aInfoArgs.routedPort(), aInfoArgs.isHttp3());
+        aInfoArgs.username(), pi, aInfoArgs.originAttributes(),
+        aInfoArgs.routedHost(), aInfoArgs.routedPort(), aInfoArgs.isHttp3());
   }
 
   // Make sure the anonymous, insecure-scheme, and private flags are transferred
   cinfo->SetAnonymous(aInfoArgs.anonymous());
   cinfo->SetPrivate(aInfoArgs.aPrivate());
   cinfo->SetInsecureScheme(aInfoArgs.insecureScheme());
   cinfo->SetNoSpdy(aInfoArgs.noSpdy());
   cinfo->SetBeConservative(aInfoArgs.beConservative());
@@ -450,19 +444,19 @@ void nsHttpConnectionInfo::CloneAsDirect
     RefPtr<nsHttpConnectionInfo> clone = Clone();
     // Explicitly set mIsHttp3 to false, since CloneAsDirectRoute() is used to
     // create a non-http3 connection info.
     clone->mIsHttp3 = false;
     clone.forget(outCI);
     return;
   }
 
-  RefPtr<nsHttpConnectionInfo> clone = new nsHttpConnectionInfo(
-      mOrigin, mOriginPort, ""_ns, mUsername, mTopWindowOrigin, mProxyInfo,
-      mOriginAttributes, mEndToEndSSL);
+  RefPtr<nsHttpConnectionInfo> clone =
+      new nsHttpConnectionInfo(mOrigin, mOriginPort, ""_ns, mUsername,
+                               mProxyInfo, mOriginAttributes, mEndToEndSSL);
   // Make sure the anonymous, insecure-scheme, and private flags are transferred
   clone->SetAnonymous(GetAnonymous());
   clone->SetPrivate(GetPrivate());
   clone->SetInsecureScheme(GetInsecureScheme());
   clone->SetNoSpdy(GetNoSpdy());
   clone->SetBeConservative(GetBeConservative());
   clone->SetTlsFlags(GetTlsFlags());
   clone->SetIsTrrServiceChannel(GetIsTrrServiceChannel());
@@ -480,18 +474,17 @@ nsresult nsHttpConnectionInfo::CreateWil
   // TS??*:0 (https:proxy.ducksong.com:3128)   [wildcard form]
 
   if (!mUsingHttpsProxy) {
     MOZ_ASSERT(false);
     return NS_ERROR_NOT_IMPLEMENTED;
   }
 
   RefPtr<nsHttpConnectionInfo> clone;
-  clone = new nsHttpConnectionInfo("*"_ns, 0, mNPNToken, mUsername,
-                                   mTopWindowOrigin, mProxyInfo,
+  clone = new nsHttpConnectionInfo("*"_ns, 0, mNPNToken, mUsername, mProxyInfo,
                                    mOriginAttributes, true, mIsHttp3);
   // Make sure the anonymous and private flags are transferred!
   clone->SetAnonymous(GetAnonymous());
   clone->SetPrivate(GetPrivate());
   clone.forget(outParam);
   return NS_OK;
 }
 
--- a/netwerk/protocol/http/nsHttpConnectionInfo.h
+++ b/netwerk/protocol/http/nsHttpConnectionInfo.h
@@ -37,27 +37,25 @@ namespace net {
 extern LazyLogModule gHttpLog;
 class HttpConnectionInfoCloneArgs;
 class nsHttpTransaction;
 
 class nsHttpConnectionInfo final : public ARefBase {
  public:
   nsHttpConnectionInfo(const nsACString& originHost, int32_t originPort,
                        const nsACString& npnToken, const nsACString& username,
-                       const nsACString& topWindowOrigin,
                        nsProxyInfo* proxyInfo,
                        const OriginAttributes& originAttributes,
                        bool endToEndSSL = false, bool aIsHttp3 = false);
 
   // this version must use TLS and you may supply separate
   // connection (aka routing) information than the authenticated
   // origin information
   nsHttpConnectionInfo(const nsACString& originHost, int32_t originPort,
                        const nsACString& npnToken, const nsACString& username,
-                       const nsACString& topWindowOrigin,
                        nsProxyInfo* proxyInfo,
                        const OriginAttributes& originAttributes,
                        const nsACString& routedHost, int32_t routedPort,
                        bool aIsHttp3);
 
   static void SerializeHttpConnectionInfo(nsHttpConnectionInfo* aInfo,
                                           HttpConnectionInfoCloneArgs& aArgs);
   static already_AddRefed<nsHttpConnectionInfo>
@@ -165,17 +163,16 @@ class nsHttpConnectionInfo final : publi
   void SetIPv4Disabled(bool aNoIPv4);
   bool GetIPv4Disabled() const { return mIPv4Disabled; }
 
   void SetIPv6Disabled(bool aNoIPv6);
   bool GetIPv6Disabled() const { return mIPv6Disabled; }
 
   const nsCString& GetNPNToken() { return mNPNToken; }
   const nsCString& GetUsername() { return mUsername; }
-  const nsCString& GetTopWindowOrigin() { return mTopWindowOrigin; }
 
   const OriginAttributes& GetOriginAttributes() { return mOriginAttributes; }
 
   // Returns true for any kind of proxy (http, socks, https, etc..)
   bool UsingProxy();
 
   // Returns true when proxying over HTTP or HTTPS
   bool UsingHttpProxy() const { return mUsingHttpProxy || mUsingHttpsProxy; }
@@ -207,29 +204,28 @@ class nsHttpConnectionInfo final : publi
   void SetHasIPHintAddress(bool aHasIPHint) { mHasIPHintAddress = aHasIPHint; }
   bool HasIPHintAddress() const { return mHasIPHintAddress; }
 
   void SetEchConfig(const nsACString& aEchConfig) { mEchConfig = aEchConfig; }
   const nsCString& GetEchConfig() const { return mEchConfig; }
 
  private:
   void Init(const nsACString& host, int32_t port, const nsACString& npnToken,
-            const nsACString& username, const nsACString& topWindowOrigin,
-            nsProxyInfo* proxyInfo, const OriginAttributes& originAttributes,
-            bool EndToEndSSL, bool aIsHttp3);
+            const nsACString& username, nsProxyInfo* proxyInfo,
+            const OriginAttributes& originAttributes, bool EndToEndSSL,
+            bool aIsHttp3);
   void SetOriginServer(const nsACString& host, int32_t port);
 
   nsCString mOrigin;
   int32_t mOriginPort;
   nsCString mRoutedHost;
   int32_t mRoutedPort;
 
   nsCString mHashKey;
   nsCString mUsername;
-  nsCString mTopWindowOrigin;
   nsCOMPtr<nsProxyInfo> mProxyInfo;
   bool mUsingHttpProxy;
   bool mUsingHttpsProxy;
   bool mEndToEndSSL;
   bool mUsingConnect;  // if will use CONNECT with http proxy
   nsCString mNPNToken;
   OriginAttributes mOriginAttributes;
   nsIRequest::TRRMode mTRRMode;
--- a/netwerk/protocol/http/nsHttpHandler.cpp
+++ b/netwerk/protocol/http/nsHttpHandler.cpp
@@ -2634,17 +2634,17 @@ nsresult nsHttpHandler::SpeculativeConne
   nsAutoCString username;
   aURI->GetUsername(username);
 
   // TODO For now pass ""_ns for topWindowOrigin for all speculative
   // connection attempts, but ideally we should pass the accurate top window
   // origin here.  This would require updating the nsISpeculativeConnect API
   // and all of its consumers.
   RefPtr<nsHttpConnectionInfo> ci =
-      new nsHttpConnectionInfo(host, port, ""_ns, username, ""_ns, nullptr,
+      new nsHttpConnectionInfo(host, port, ""_ns, username, nullptr,
                                originAttributes, aURI->SchemeIs("https"));
   ci->SetAnonymous(anonymous);
 
   return SpeculativeConnect(ci, aCallbacks);
 }
 
 NS_IMETHODIMP
 nsHttpHandler::SpeculativeConnect(nsIURI* aURI, nsIPrincipal* aPrincipal,