Bug 1623565 - P3: Remove mLoadFlags from DocumentChannelCreationArgs. r=mattwoodrow,jya
authorDan Glastonbury <dan.glastonbury@gmail.com>
Mon, 27 Apr 2020 05:38:15 +0000
changeset 526172 7097774bd9a393ce6fd6d774d06f566f7aeb0995
parent 526171 7fca414d77987ab2bb80a2b3d66b317432adc0fa
child 526173 141c527ee14a2a624e5c2558a9213ac2be3338a0
push id37353
push usershindli@mozilla.com
push dateMon, 27 Apr 2020 21:46:18 +0000
treeherdermozilla-central@2b0e2483e2ea [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow, jya
bugs1623565
milestone77.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 1623565 - P3: Remove mLoadFlags from DocumentChannelCreationArgs. r=mattwoodrow,jya Differential Revision: https://phabricator.services.mozilla.com/D67799
docshell/base/nsDocShell.cpp
netwerk/ipc/DocumentChannel.cpp
netwerk/ipc/DocumentChannel.h
netwerk/ipc/DocumentChannelChild.cpp
netwerk/ipc/DocumentChannelChild.h
netwerk/ipc/DocumentChannelParent.cpp
netwerk/ipc/DocumentLoadListener.cpp
netwerk/ipc/DocumentLoadListener.h
netwerk/ipc/NeckoChannelParams.ipdlh
netwerk/ipc/ParentProcessDocumentChannel.cpp
netwerk/ipc/ParentProcessDocumentChannel.h
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -9721,17 +9721,18 @@ nsresult nsDocShell::DoURILoad(nsDocShel
   }
 
   nsLoadFlags loadFlags = aLoadState->CalculateChannelLoadFlags(
       mBrowsingContext, Some(uriModified), Some(isXFOError));
 
   nsCOMPtr<nsIChannel> channel;
   if (DocumentChannel::CanUseDocumentChannel(aLoadState)) {
     channel = DocumentChannel::CreateDocumentChannel(aLoadState, loadInfo,
-                                                     loadFlags, this, cacheKey);
+                                                     loadFlags, this, cacheKey,
+                                                     uriModified, isXFOError);
     MOZ_ASSERT(channel);
   } else if (!CreateAndConfigureRealChannelForLoadState(
                  mBrowsingContext, aLoadState, loadInfo, this, this,
                  GetOriginAttributes(), loadFlags, cacheKey, rv,
                  getter_AddRefs(channel))) {
     return rv;
   }
 
--- a/netwerk/ipc/DocumentChannel.cpp
+++ b/netwerk/ipc/DocumentChannel.cpp
@@ -55,23 +55,26 @@ NS_INTERFACE_MAP_BEGIN(DocumentChannel)
   NS_INTERFACE_MAP_ENTRY(nsIIdentChannel)
   NS_INTERFACE_MAP_ENTRY(nsITraceableChannel)
   NS_INTERFACE_MAP_ENTRY_CONCRETE(DocumentChannel)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIRequest)
 NS_INTERFACE_MAP_END
 
 DocumentChannel::DocumentChannel(nsDocShellLoadState* aLoadState,
                                  net::LoadInfo* aLoadInfo,
-                                 nsLoadFlags aLoadFlags, uint32_t aCacheKey)
+                                 nsLoadFlags aLoadFlags, uint32_t aCacheKey,
+                                 bool aUriModified, bool aIsXFOError)
     : mAsyncOpenTime(TimeStamp::Now()),
       mLoadState(aLoadState),
       mCacheKey(aCacheKey),
       mLoadFlags(aLoadFlags),
       mURI(aLoadState->URI()),
-      mLoadInfo(aLoadInfo) {
+      mLoadInfo(aLoadInfo),
+      mUriModified(aUriModified),
+      mIsXFOError(aIsXFOError) {
   LOG(("DocumentChannel ctor [this=%p, uri=%s]", this,
        aLoadState->URI()->GetSpecOrDefault().get()));
   RefPtr<nsHttpHandler> handler = nsHttpHandler::GetInstance();
   uint64_t channelId;
   Unused << handler->NewChannelId(channelId);
   mChannelId = channelId;
 }
 
@@ -168,24 +171,25 @@ bool DocumentChannel::CanUseDocumentChan
          !aLoadState->HasLoadFlags(nsDocShell::INTERNAL_LOAD_FLAGS_IS_SRCDOC) &&
          URIUsesDocChannel(aLoadState->URI());
 }
 
 /* static */
 already_AddRefed<DocumentChannel> DocumentChannel::CreateDocumentChannel(
     nsDocShellLoadState* aLoadState, class LoadInfo* aLoadInfo,
     nsLoadFlags aLoadFlags, nsIInterfaceRequestor* aNotificationCallbacks,
-    uint32_t aCacheKey) {
+    uint32_t aCacheKey, bool aUriModified, bool aIsXFOError) {
   RefPtr<DocumentChannel> channel;
   if (XRE_IsContentProcess()) {
-    channel =
-        new DocumentChannelChild(aLoadState, aLoadInfo, aLoadFlags, aCacheKey);
+    channel = new DocumentChannelChild(aLoadState, aLoadInfo, aLoadFlags,
+                                       aCacheKey, aUriModified, aIsXFOError);
   } else {
-    channel = new ParentProcessDocumentChannel(aLoadState, aLoadInfo,
-                                               aLoadFlags, aCacheKey);
+    channel =
+        new ParentProcessDocumentChannel(aLoadState, aLoadInfo, aLoadFlags,
+                                         aCacheKey, aUriModified, aIsXFOError);
   }
   channel->SetNotificationCallbacks(aNotificationCallbacks);
   return channel.forget();
 }
 
 //-----------------------------------------------------------------------------
 // DocumentChannel::nsITraceableChannel
 //-----------------------------------------------------------------------------
@@ -283,17 +287,17 @@ DocumentChannel::GetTRRMode(nsIRequest::
 }
 
 NS_IMETHODIMP
 DocumentChannel::SetTRRMode(nsIRequest::TRRMode aTRRMode) {
   return SetTRRModeImpl(aTRRMode);
 }
 
 NS_IMETHODIMP DocumentChannel::SetLoadFlags(nsLoadFlags aLoadFlags) {
-  mLoadFlags = aLoadFlags;
+  MOZ_CRASH("Don't set flags after creation");
   return NS_OK;
 }
 
 NS_IMETHODIMP DocumentChannel::GetOriginalURI(nsIURI** aOriginalURI) {
   nsCOMPtr<nsIURI> originalURI =
       mLoadState->OriginalURI() ? mLoadState->OriginalURI() : mLoadState->URI();
   originalURI.forget(aOriginalURI);
   return NS_OK;
--- a/netwerk/ipc/DocumentChannel.h
+++ b/netwerk/ipc/DocumentChannel.h
@@ -66,23 +66,24 @@ class DocumentChannel : public nsIIdentC
    * Will create the appropriate document channel:
    * Either a DocumentChannelChild if called from the content process or
    * a ParentProcessDocumentChannel if called from the parent process.
    * This operation is infallible.
    */
   static already_AddRefed<DocumentChannel> CreateDocumentChannel(
       nsDocShellLoadState* aLoadState, class LoadInfo* aLoadInfo,
       nsLoadFlags aLoadFlags, nsIInterfaceRequestor* aNotificationCallbacks,
-      uint32_t aCacheKey);
+      uint32_t aCacheKey, bool aUriModified, bool aIsXFOError);
 
   static bool CanUseDocumentChannel(nsDocShellLoadState* aLoadState);
 
  protected:
   DocumentChannel(nsDocShellLoadState* aLoadState, class LoadInfo* aLoadInfo,
-                  nsLoadFlags aLoadFlags, uint32_t aCacheKey);
+                  nsLoadFlags aLoadFlags, uint32_t aCacheKey, bool aUriModified,
+                  bool aIsXFOError);
 
   void ShutdownListeners(nsresult aStatusCode);
   void DisconnectChildListeners(const nsresult& aStatus,
                                 const nsresult& aLoadGroupStatus);
   virtual void DeleteIPDL() {}
 
   nsDocShell* GetDocShell();
 
@@ -104,16 +105,22 @@ class DocumentChannel : public nsIIdentC
   const nsCOMPtr<nsIURI> mURI;
   nsCOMPtr<nsILoadGroup> mLoadGroup;
   nsCOMPtr<nsILoadInfo> mLoadInfo;
   nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
   nsCOMPtr<nsIStreamListener> mListener;
   nsCOMPtr<nsISupports> mOwner;
   RefPtr<nsDOMNavigationTiming> mTiming;
   Maybe<dom::ClientInfo> mInitialClientInfo;
+  // mUriModified is true if we're doing a history load and the URI of the
+  // session history had been modified by pushState/replaceState.
+  bool mUriModified = false;
+  // mIsXFOError is true if we're handling a load error and the status of the
+  // failed channel is NS_ERROR_XFO_VIOLATION.
+  bool mIsXFOError = false;
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(DocumentChannel, DOCUMENT_CHANNEL_IID)
 
 }  // namespace net
 }  // namespace mozilla
 
 #endif  // mozilla_net_DocumentChannel_h
--- a/netwerk/ipc/DocumentChannelChild.cpp
+++ b/netwerk/ipc/DocumentChannelChild.cpp
@@ -24,18 +24,20 @@ NS_INTERFACE_MAP_BEGIN(DocumentChannelCh
 NS_INTERFACE_MAP_END_INHERITING(DocumentChannel)
 
 NS_IMPL_ADDREF_INHERITED(DocumentChannelChild, DocumentChannel)
 NS_IMPL_RELEASE_INHERITED(DocumentChannelChild, DocumentChannel)
 
 DocumentChannelChild::DocumentChannelChild(nsDocShellLoadState* aLoadState,
                                            net::LoadInfo* aLoadInfo,
                                            nsLoadFlags aLoadFlags,
-                                           uint32_t aCacheKey)
-    : DocumentChannel(aLoadState, aLoadInfo, aLoadFlags, aCacheKey) {
+                                           uint32_t aCacheKey,
+                                           bool aUriModified, bool aIsXFOError)
+    : DocumentChannel(aLoadState, aLoadInfo, aLoadFlags, aCacheKey,
+                      aUriModified, aIsXFOError) {
   LOG(("DocumentChannelChild ctor [this=%p, uri=%s]", this,
        aLoadState->URI()->GetSpecOrDefault().get()));
 }
 
 DocumentChannelChild::~DocumentChannelChild() {
   LOG(("DocumentChannelChild dtor [this=%p]", this));
 }
 
@@ -76,21 +78,22 @@ DocumentChannelChild::AsyncOpen(nsIStrea
   if (!GetDocShell() || !GetDocShell()->GetBrowsingContext() ||
       GetDocShell()->GetBrowsingContext()->IsDiscarded()) {
     return NS_ERROR_FAILURE;
   }
 
   DocumentChannelCreationArgs args;
 
   args.loadState() = mLoadState->Serialize();
-  args.loadFlags() = mLoadFlags;
   args.cacheKey() = mCacheKey;
   args.channelId() = mChannelId;
   args.asyncOpenTime() = mAsyncOpenTime;
   args.outerWindowId() = GetDocShell()->GetOuterWindowID();
+  args.uriModified() = mUriModified;
+  args.isXFOError() = mIsXFOError;
 
   Maybe<IPCClientInfo> ipcClientInfo;
   if (mInitialClientInfo.isSome()) {
     ipcClientInfo.emplace(mInitialClientInfo.ref().ToIPC());
   }
   args.initialClientInfo() = ipcClientInfo;
 
   if (mTiming) {
--- a/netwerk/ipc/DocumentChannelChild.h
+++ b/netwerk/ipc/DocumentChannelChild.h
@@ -22,17 +22,17 @@ namespace net {
  * across IPDL to the parent process.
  */
 class DocumentChannelChild final : public DocumentChannel,
                                    public nsIAsyncVerifyRedirectCallback,
                                    public PDocumentChannelChild {
  public:
   DocumentChannelChild(nsDocShellLoadState* aLoadState,
                        class LoadInfo* aLoadInfo, nsLoadFlags aLoadFlags,
-                       uint32_t aCacheKey);
+                       uint32_t aCacheKey, bool aUriModified, bool aIsXFOError);
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIASYNCVERIFYREDIRECTCALLBACK
 
   NS_IMETHOD AsyncOpen(nsIStreamListener* aListener) override;
   NS_IMETHOD Cancel(nsresult aStatusCode) override;
 
   mozilla::ipc::IPCResult RecvFailedAsyncOpen(const nsresult& aStatusCode);
--- a/netwerk/ipc/DocumentChannelParent.cpp
+++ b/netwerk/ipc/DocumentChannelParent.cpp
@@ -43,20 +43,21 @@ bool DocumentChannelParent::Init(dom::Ca
   mParent = new DocumentLoadListener(aContext, this);
 
   Maybe<ClientInfo> clientInfo;
   if (aArgs.initialClientInfo().isSome()) {
     clientInfo.emplace(ClientInfo(aArgs.initialClientInfo().ref()));
   }
 
   nsresult rv = NS_ERROR_UNEXPECTED;
-  if (!mParent->Open(loadState, aArgs.loadFlags(), aArgs.cacheKey(),
-                     Some(aArgs.channelId()), aArgs.asyncOpenTime(),
-                     aArgs.timing().refOr(nullptr), std::move(clientInfo),
-                     aArgs.outerWindowId(), aArgs.hasValidTransientUserAction(),
+  if (!mParent->Open(loadState, aArgs.cacheKey(), Some(aArgs.channelId()),
+                     aArgs.asyncOpenTime(), aArgs.timing().refOr(nullptr),
+                     std::move(clientInfo), aArgs.outerWindowId(),
+                     aArgs.hasValidTransientUserAction(),
+                     Some(aArgs.uriModified()), Some(aArgs.isXFOError()),
                      &rv)) {
     return SendFailedAsyncOpen(rv);
   }
 
   return true;
 }
 
 RefPtr<PDocumentChannelParent::RedirectToRealChannelPromise>
--- a/netwerk/ipc/DocumentLoadListener.cpp
+++ b/netwerk/ipc/DocumentLoadListener.cpp
@@ -355,20 +355,21 @@ GetTopWindowExcludingExtensionAccessible
 CanonicalBrowsingContext* DocumentLoadListener::GetBrowsingContext() {
   if (!mParentChannelListener) {
     return nullptr;
   }
   return mParentChannelListener->GetBrowsingContext();
 }
 
 bool DocumentLoadListener::Open(
-    nsDocShellLoadState* aLoadState, nsLoadFlags aLoadFlags, uint32_t aCacheKey,
+    nsDocShellLoadState* aLoadState, uint32_t aCacheKey,
     const Maybe<uint64_t>& aChannelId, const TimeStamp& aAsyncOpenTime,
     nsDOMNavigationTiming* aTiming, Maybe<ClientInfo>&& aInfo,
-    uint64_t aOuterWindowId, bool aHasGesture, nsresult* aRv) {
+    uint64_t aOuterWindowId, bool aHasGesture, Maybe<bool> aUriModified,
+    Maybe<bool> aIsXFOError, nsresult* aRv) {
   LOG(("DocumentLoadListener Open [this=%p, uri=%s]", this,
        aLoadState->URI()->GetSpecOrDefault().get()));
   RefPtr<CanonicalBrowsingContext> browsingContext =
       mParentChannelListener->GetBrowsingContext();
 
   OriginAttributes attrs;
   browsingContext->GetOriginAttributes(attrs);
 
@@ -383,19 +384,22 @@ bool DocumentLoadListener::Open(
   }
 
   // If this is a top-level load, then rebuild the LoadInfo from scratch,
   // since the goal is to be able to initiate loads in the parent, where the
   // content process won't have provided us with an existing one.
   RefPtr<LoadInfo> loadInfo =
       CreateLoadInfo(browsingContext, aLoadState, aOuterWindowId);
 
+  nsLoadFlags loadFlags = aLoadState->CalculateChannelLoadFlags(
+      browsingContext, std::move(aUriModified), std::move(aIsXFOError));
+
   if (!nsDocShell::CreateAndConfigureRealChannelForLoadState(
           browsingContext, aLoadState, loadInfo, mParentChannelListener,
-          nullptr, attrs, aLoadFlags, aCacheKey, *aRv,
+          nullptr, attrs, loadFlags, aCacheKey, *aRv,
           getter_AddRefs(mChannel))) {
     mParentChannelListener = nullptr;
     return false;
   }
 
   nsCOMPtr<nsIURI> uriBeingLoaded =
       AntiTrackingUtils::MaybeGetDocumentURIBeingLoaded(mChannel);
 
@@ -573,28 +577,16 @@ bool DocumentLoadListener::OpenFromParen
     return false;
   }
 
   // Clone because this mutates the load flags in the load state, which
   // breaks nsDocShells expectations of being able to do it.
   RefPtr<nsDocShellLoadState> loadState = new nsDocShellLoadState(*aLoadState);
   loadState->CalculateLoadURIFlags();
 
-  nsLoadFlags loadFlags = loadState->LoadFlags() |
-                          nsIChannel::LOAD_DOCUMENT_URI |
-                          nsIChannel::LOAD_CALL_CONTENT_SNIFFERS;
-  uint32_t sandboxFlags = aBrowsingContext->GetSandboxFlags();
-  if ((sandboxFlags & (SANDBOXED_ORIGIN | SANDBOXED_SCRIPTS)) == 0) {
-    loadFlags |= nsIRequest::LOAD_DOCUMENT_NEEDS_COOKIE;
-  }
-  if (loadState->FirstParty()) {
-    // tag first party URL loads
-    loadFlags |= nsIChannel::LOAD_INITIAL_DOCUMENT_URI;
-  }
-
   RefPtr<nsDOMNavigationTiming> timing = new nsDOMNavigationTiming(nullptr);
   timing->NotifyNavigationStart(
       aBrowsingContext->GetIsActive()
           ? nsDOMNavigationTiming::DocShellState::eActive
           : nsDOMNavigationTiming::DocShellState::eInactive);
 
   // We're not a history load or a reload, so we don't need this.
   uint32_t cacheKey = 0;
@@ -607,19 +599,20 @@ bool DocumentLoadListener::OpenFromParen
   // Initial client info is only relevant for subdocument loads, which we're
   // not supporting yet.
   Maybe<dom::ClientInfo> initialClientInfo;
 
   RefPtr<DocumentLoadListener> listener = new DocumentLoadListener(
       aBrowsingContext, aBrowsingContext->GetContentParent()->OtherPid());
 
   nsresult rv;
-  bool result = listener->Open(
-      loadState, loadFlags, cacheKey, channelId, TimeStamp::Now(), timing,
-      std::move(initialClientInfo), aOuterWindowId, false, &rv);
+  bool result =
+      listener->Open(loadState, cacheKey, channelId, TimeStamp::Now(), timing,
+                     std::move(initialClientInfo), aOuterWindowId, false,
+                     Nothing(), Nothing(), &rv);
   if (result) {
     // Create an entry in the redirect channel registrar to
     // allocate an identifier for this load.
     nsCOMPtr<nsIRedirectChannelRegistrar> registrar =
         RedirectChannelRegistrar::GetOrCreate();
     rv = registrar->RegisterChannel(nullptr, aOutIdent);
     MOZ_ASSERT(NS_SUCCEEDED(rv));
     // Register listener (as an nsIParentChannel) under our new identifier.
--- a/netwerk/ipc/DocumentLoadListener.h
+++ b/netwerk/ipc/DocumentLoadListener.h
@@ -89,21 +89,21 @@ class DocumentLoadListener : public nsII
                              public nsIChannelEventSink,
                              public HttpChannelSecurityWarningReporter,
                              public nsIMultiPartChannelListener {
  public:
   explicit DocumentLoadListener(dom::CanonicalBrowsingContext* aBrowsingContext,
                                 ADocumentChannelBridge* aBridge);
 
   // Creates the channel, and then calls AsyncOpen on it.
-  bool Open(nsDocShellLoadState* aLoadState, nsLoadFlags aLoadFlags,
-            uint32_t aCacheKey, const Maybe<uint64_t>& aChannelId,
-            const TimeStamp& aAsyncOpenTime, nsDOMNavigationTiming* aTiming,
-            Maybe<dom::ClientInfo>&& aInfo, uint64_t aOuterWindowId,
-            bool aHasGesture, nsresult* aRv);
+  bool Open(nsDocShellLoadState* aLoadState, uint32_t aCacheKey,
+            const Maybe<uint64_t>& aChannelId, const TimeStamp& aAsyncOpenTime,
+            nsDOMNavigationTiming* aTiming, Maybe<dom::ClientInfo>&& aInfo,
+            uint64_t aOuterWindowId, bool aHasGesture, Maybe<bool> aUriModified,
+            Maybe<bool> aIsXFOError, nsresult* aRv);
 
   // Creates a DocumentLoadListener directly in the parent process without
   // an associated DocumentChannelBridge.
   // If successful it registers a unique identifier (return in aOutIdent) to
   // keep it alive until a future bridge can attach to it, or we fail and clean
   // up.
   static bool OpenFromParent(dom::CanonicalBrowsingContext* aBrowsingContext,
                              nsDocShellLoadState* aLoadState,
--- a/netwerk/ipc/NeckoChannelParams.ipdlh
+++ b/netwerk/ipc/NeckoChannelParams.ipdlh
@@ -429,23 +429,24 @@ struct CookieStruct
   int32_t   sameSite;
   int32_t   rawSameSite;
 };
 
 struct DocumentChannelCreationArgs {
   DocShellLoadStateInit loadState;
   TimeStamp asyncOpenTime;
   uint64_t channelId;
-  uint32_t loadFlags;
   uint32_t cacheKey;
   bool pluginsAllowed;
   nsDOMNavigationTiming? timing;
   IPCClientInfo? initialClientInfo;
   uint64_t outerWindowId;
   bool hasValidTransientUserAction;
+  bool uriModified;
+  bool isXFOError;
 };
 
 struct DocumentChannelRedirect {
   nsIURI uri;
   uint32_t redirectFlags;
   uint32_t responseStatus;
   bool isPost;
 };
--- a/netwerk/ipc/ParentProcessDocumentChannel.cpp
+++ b/netwerk/ipc/ParentProcessDocumentChannel.cpp
@@ -15,18 +15,20 @@ extern mozilla::LazyLogModule gDocumentC
 namespace mozilla {
 namespace net {
 
 NS_IMPL_ISUPPORTS_INHERITED(ParentProcessDocumentChannel, DocumentChannel,
                             nsIAsyncVerifyRedirectCallback, nsIObserver)
 
 ParentProcessDocumentChannel::ParentProcessDocumentChannel(
     nsDocShellLoadState* aLoadState, class LoadInfo* aLoadInfo,
-    nsLoadFlags aLoadFlags, uint32_t aCacheKey)
-    : DocumentChannel(aLoadState, aLoadInfo, aLoadFlags, aCacheKey) {
+    nsLoadFlags aLoadFlags, uint32_t aCacheKey, bool aUriModified,
+    bool aIsXFOError)
+    : DocumentChannel(aLoadState, aLoadInfo, aLoadFlags, aCacheKey,
+                      aUriModified, aIsXFOError) {
   LOG(("ParentProcessDocumentChannel ctor [this=%p]", this));
 }
 
 ParentProcessDocumentChannel::~ParentProcessDocumentChannel() {
   LOG(("ParentProcessDocumentChannel dtor [this=%p]", this));
 }
 
 RefPtr<PDocumentChannelParent::RedirectToRealChannelPromise>
@@ -120,23 +122,22 @@ NS_IMETHODIMP ParentProcessDocumentChann
         this, NS_HTTP_ON_MODIFY_REQUEST_TOPIC, false));
   }
 
   gHttpHandler->OnOpeningDocumentRequest(this);
 
   nsresult rv = NS_OK;
   Maybe<dom::ClientInfo> initialClientInfo = mInitialClientInfo;
   if (!mDocumentLoadListener->Open(
-          mLoadState, mLoadFlags, mCacheKey, Some(mChannelId), mAsyncOpenTime,
-          mTiming, std::move(initialClientInfo),
-          GetDocShell()->GetOuterWindowID(),
+          mLoadState, mCacheKey, Some(mChannelId), mAsyncOpenTime, mTiming,
+          std::move(initialClientInfo), GetDocShell()->GetOuterWindowID(),
           GetDocShell()
               ->GetBrowsingContext()
               ->HasValidTransientUserGestureActivation(),
-          &rv)) {
+          Some(mUriModified), Some(mIsXFOError), &rv)) {
     MOZ_ASSERT(NS_FAILED(rv));
     DisconnectDocumentLoadListener();
     return rv;
   }
 
   mListener = aListener;
   if (mLoadGroup) {
     mLoadGroup->AddRequest(this, nullptr);
--- a/netwerk/ipc/ParentProcessDocumentChannel.h
+++ b/netwerk/ipc/ParentProcessDocumentChannel.h
@@ -18,17 +18,18 @@ namespace net {
 
 class ParentProcessDocumentChannel : public DocumentChannel,
                                      public nsIAsyncVerifyRedirectCallback,
                                      public nsIObserver,
                                      public ADocumentChannelBridge {
  public:
   ParentProcessDocumentChannel(nsDocShellLoadState* aLoadState,
                                class LoadInfo* aLoadInfo,
-                               nsLoadFlags aLoadFlags, uint32_t aCacheKey);
+                               nsLoadFlags aLoadFlags, uint32_t aCacheKey,
+                               bool aUriModified, bool aIsXFOError);
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIASYNCVERIFYREDIRECTCALLBACK
   NS_DECL_NSIOBSERVER
 
   NS_IMETHOD AsyncOpen(nsIStreamListener* aListener) override;
   NS_IMETHOD Cancel(nsresult aStatusCode) override;