From 1edefc131ef701a699fe291e2b420f18b890aae0 Mon Sep 17 00:00:00 2001 From: Makoto Kato Date: Fri, 17 Mar 2023 01:41:50 +0000 Subject: [PATCH] Bug 1673068 - Get rid of nsILoadURIDelegate.loadURI. r=smaug,geckoview-reviewers,owlish `nsILoadURIDelegate.loadURI` seems to be unused now. Differential Revision: https://phabricator.services.mozilla.com/D172392 --- docshell/base/nsILoadURIDelegate.idl | 14 -------- .../android/actors/LoadURIDelegateChild.jsm | 36 ------------------- 2 files changed, 50 deletions(-) diff --git a/docshell/base/nsILoadURIDelegate.idl b/docshell/base/nsILoadURIDelegate.idl index 512535cee5e0..eb5d4cbaf5fc 100644 --- a/docshell/base/nsILoadURIDelegate.idl +++ b/docshell/base/nsILoadURIDelegate.idl @@ -19,20 +19,6 @@ interface nsIPrincipal; [scriptable, uuid(78e42d37-a34c-4d96-b901-25385669aba4)] interface nsILoadURIDelegate : nsISupports { - /** - * Delegates the URI load. This should only be called for top-level loads. - * - * @param aURI The URI to load. - * @param aWhere See possible values described in nsIBrowserDOMWindow. - * @param aFlags Flags which control the behavior of the load. - * @param aTriggeringPrincipal The principal that triggered the load of aURI. - * - * Returns whether the load has been successfully handled. - */ - boolean - loadURI(in nsIURI aURI, in short aWhere, in long aFlags, - in nsIPrincipal aTriggeringPrincipal); - /** * Delegates page load error handling. This may be called for either top-level * loads or subframes. diff --git a/mobile/android/actors/LoadURIDelegateChild.jsm b/mobile/android/actors/LoadURIDelegateChild.jsm index 1dd2ef01053f..e455ed8ba3e8 100644 --- a/mobile/android/actors/LoadURIDelegateChild.jsm +++ b/mobile/android/actors/LoadURIDelegateChild.jsm @@ -9,46 +9,10 @@ const { LoadURIDelegate } = ChromeUtils.import( "resource://gre/modules/LoadURIDelegate.jsm" ); -const lazy = {}; - -ChromeUtils.defineESModuleGetters(lazy, { - E10SUtils: "resource://gre/modules/E10SUtils.sys.mjs", -}); - var EXPORTED_SYMBOLS = ["LoadURIDelegateChild"]; // Implements nsILoadURIDelegate. class LoadURIDelegateChild extends GeckoViewActorChild { - // nsILoadURIDelegate. - loadURI(aUri, aWhere, aFlags, aTriggeringPrincipal) { - debug`loadURI: uri=${aUri && aUri.spec} - where=${aWhere} flags=0x${aFlags.toString(16)} - tp=${aTriggeringPrincipal && aTriggeringPrincipal.spec}`; - - // Ignore any load going to the extension process - // TODO: Remove workaround after Bug 1619798 and Bug 1535365. - if ( - WebExtensionPolicy.useRemoteWebExtensions && - lazy.E10SUtils.getRemoteTypeForURIObject(aUri, { - multiProcess: true, - remoteSubFrames: false, - preferredRemoteType: Services.appinfo.remoteType, - }) == lazy.E10SUtils.EXTENSION_REMOTE_TYPE - ) { - debug`Bypassing load delegate in the Extension process.`; - return false; - } - - return LoadURIDelegate.load( - this.contentWindow, - this.eventDispatcher, - aUri, - aWhere, - aFlags, - aTriggeringPrincipal - ); - } - // nsILoadURIDelegate. handleLoadError(aUri, aError, aErrorModule) { debug`handleLoadError: uri=${aUri && aUri.spec}