diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index 4a9a6c0ce6f2..b478e2498871 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -4405,6 +4405,11 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI, } } + // Test if the error should be displayed + if (!error) { + return NS_OK; + } + if (mLoadURIDelegate) { nsCOMPtr errorPageURI; rv = mLoadURIDelegate->HandleLoadError(aURI, aError, @@ -4422,11 +4427,6 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI, } } - // Test if the error should be displayed - if (!error) { - return NS_OK; - } - if (!errorDescriptionID) { errorDescriptionID = error; } diff --git a/dom/interfaces/base/nsIBrowser.idl b/dom/interfaces/base/nsIBrowser.idl index f4453b601a49..4ab901423f09 100644 --- a/dom/interfaces/base/nsIBrowser.idl +++ b/dom/interfaces/base/nsIBrowser.idl @@ -7,7 +7,6 @@ interface nsIContentSecurityPolicy; interface nsIPrincipal; interface nsIURI; interface nsIWebProgress; -interface nsIReferrerInfo; webidl FrameLoader; @@ -82,7 +81,6 @@ interface nsIBrowser : nsISupports readonly attribute nsIPrincipal contentPrincipal; readonly attribute nsIContentSecurityPolicy csp; - readonly attribute nsIReferrerInfo referrerInfo; /** * Whether or not the browser is in the process of an nsIWebNavigation @@ -138,7 +136,6 @@ interface nsIBrowser : nsISupports * @param aContentStoragePrincipal the security principal for the new * document's storage * @param aCSP the content security policy of the new document - * @param aReferrerInfo the referrer info of the new document * @param aIsSynthetic whether or not the document is synthetic * @param aInnerWindowID the inner window ID of the document * @param aHasRequestContextID whether or not the the request context has a @@ -155,7 +152,6 @@ interface nsIBrowser : nsISupports in nsIPrincipal aContentPrincipal, in nsIPrincipal aContentStoragePrincipal, in nsIContentSecurityPolicy aCSP, - in nsIReferrerInfo aReferrerInfo, in boolean aIsSynthetic, in uint64_t aInnerWindowID, in boolean aHasRequestContextID, diff --git a/dom/ipc/BrowserChild.cpp b/dom/ipc/BrowserChild.cpp index 6ed1c6b6a35a..d0dcf4224ae1 100644 --- a/dom/ipc/BrowserChild.cpp +++ b/dom/ipc/BrowserChild.cpp @@ -3616,7 +3616,6 @@ NS_IMETHODIMP BrowserChild::OnLocationChange(nsIWebProgress* aWebProgress, MOZ_TRY(CSPToCSPInfo(csp, &locationChangeData->csp().ref())); } - locationChangeData->referrerInfo() = document->ReferrerInfo(); locationChangeData->isSyntheticDocument() = document->IsSyntheticDocument(); if (nsCOMPtr loadGroup = document->GetDocumentLoadGroup()) { diff --git a/dom/ipc/BrowserParent.cpp b/dom/ipc/BrowserParent.cpp index e92749415826..f3b6445e1020 100644 --- a/dom/ipc/BrowserParent.cpp +++ b/dom/ipc/BrowserParent.cpp @@ -2494,8 +2494,6 @@ mozilla::ipc::IPCResult BrowserParent::RecvOnLocationChange( PrincipalInfoToPrincipal(aLocationChangeData->contentPrincipal()); nsCOMPtr contentStoragePrincipal = PrincipalInfoToPrincipal( aLocationChangeData->contentStoragePrincipal()); - nsCOMPtr referrerInfo = - aLocationChangeData->referrerInfo(); Unused << browser->SetIsNavigating(aLocationChangeData->isNavigating()); Unused << browser->UpdateForLocationChange( @@ -2503,7 +2501,7 @@ mozilla::ipc::IPCResult BrowserParent::RecvOnLocationChange( aLocationChangeData->mayEnableCharacterEncodingMenu(), aLocationChangeData->charsetAutodetected(), aLocationChangeData->documentURI(), aLocationChangeData->title(), - contentPrincipal, contentStoragePrincipal, csp, referrerInfo, + contentPrincipal, contentStoragePrincipal, csp, aLocationChangeData->isSyntheticDocument(), aWebProgressData->innerDOMWindowID(), aLocationChangeData->requestContextID().isSome(), diff --git a/dom/ipc/PBrowser.ipdl b/dom/ipc/PBrowser.ipdl index 791367717056..fef3cef50d62 100644 --- a/dom/ipc/PBrowser.ipdl +++ b/dom/ipc/PBrowser.ipdl @@ -153,7 +153,6 @@ struct WebProgressLocationChangeData PrincipalInfo contentPrincipal; PrincipalInfo contentStoragePrincipal; CSPInfo? csp; - nsIReferrerInfo referrerInfo; uint64_t? requestContextID; }; diff --git a/toolkit/content/widgets/browser-custom-element.js b/toolkit/content/widgets/browser-custom-element.js index 92aa89dd7ad8..e52b1061502a 100644 --- a/toolkit/content/widgets/browser-custom-element.js +++ b/toolkit/content/widgets/browser-custom-element.js @@ -306,8 +306,6 @@ this._csp = null; - this._referrerInfo = null; - this._contentRequestContextID = null; this._fullZoom = 1; @@ -804,22 +802,6 @@ this.markupDocumentViewer.fullZoom = val; } } - - get referrerInfo() { - return this.isRemoteBrowser ? this._referrerInfo : this.contentDocument.referrerInfo; - } - - get contentRequestContextID() { - if (this.isRemoteBrowser) { - return this._contentRequestContextID; - } - try { - return this.contentDocument.documentLoadGroup - .requestContextID; - } catch (e) { - return null; - } - } get fullZoom() { if (this.isRemoteBrowser) { @@ -1578,7 +1560,6 @@ aContentPrincipal, aContentStoragePrincipal, aCSP, - aReferrerInfo, aIsSynthetic, aInnerWindowID, aHaveRequestContextID, @@ -1603,7 +1584,6 @@ this._contentPrincipal = aContentPrincipal; this._contentStoragePrincipal = aContentStoragePrincipal; this._csp = aCSP; - this._referrerInfo = aReferrerInfo; this._isSyntheticDocument = aIsSynthetic; this._innerWindowID = aInnerWindowID; this._contentRequestContextID = aHaveRequestContextID