forked from mirrors/gecko-dev
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
This commit is contained in:
parent
b00dd8d6e0
commit
1edefc131e
2 changed files with 0 additions and 50 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Reference in a new issue