Bug 1756049 - Don't load GeckoViewWebExtension in child process. r=jonalmeida

I believe this was a mistake and never needed in the first place.

Differential Revision: https://phabricator.services.mozilla.com/D141976
This commit is contained in:
Agi Sferro 2022-05-16 21:52:53 +00:00
Родитель 134493c268
Коммит c17a53bf0d
2 изменённых файлов: 29 добавлений и 70 удалений

Просмотреть файл

@ -104,35 +104,6 @@ class GeckoViewStartup {
module: "resource://gre/modules/GeckoViewConsole.jsm",
});
GeckoViewUtils.addLazyGetter(this, "GeckoViewWebExtension", {
module: "resource://gre/modules/GeckoViewWebExtension.jsm",
ged: [
"GeckoView:ActionDelegate:Attached",
"GeckoView:BrowserAction:Click",
"GeckoView:PageAction:Click",
"GeckoView:RegisterWebExtension",
"GeckoView:UnregisterWebExtension",
"GeckoView:WebExtension:CancelInstall",
"GeckoView:WebExtension:Disable",
"GeckoView:WebExtension:Enable",
"GeckoView:WebExtension:EnsureBuiltIn",
"GeckoView:WebExtension:Get",
"GeckoView:WebExtension:Install",
"GeckoView:WebExtension:InstallBuiltIn",
"GeckoView:WebExtension:List",
"GeckoView:WebExtension:PortDisconnect",
"GeckoView:WebExtension:PortMessageFromApp",
"GeckoView:WebExtension:SetPBAllowed",
"GeckoView:WebExtension:Uninstall",
"GeckoView:WebExtension:Update",
],
observers: [
"devtools-installed-addon",
"testing-installed-addon",
"testing-uninstalled-addon",
],
});
GeckoViewUtils.addLazyGetter(this, "GeckoViewStorageController", {
module: "resource://gre/modules/GeckoViewStorageController.jsm",
ged: [
@ -169,6 +140,35 @@ class GeckoViewStartup {
ActorManagerParent.addJSWindowActors(JSWINDOWACTORS);
ActorManagerParent.addJSProcessActors(JSPROCESSACTORS);
GeckoViewUtils.addLazyGetter(this, "GeckoViewWebExtension", {
module: "resource://gre/modules/GeckoViewWebExtension.jsm",
ged: [
"GeckoView:ActionDelegate:Attached",
"GeckoView:BrowserAction:Click",
"GeckoView:PageAction:Click",
"GeckoView:RegisterWebExtension",
"GeckoView:UnregisterWebExtension",
"GeckoView:WebExtension:CancelInstall",
"GeckoView:WebExtension:Disable",
"GeckoView:WebExtension:Enable",
"GeckoView:WebExtension:EnsureBuiltIn",
"GeckoView:WebExtension:Get",
"GeckoView:WebExtension:Install",
"GeckoView:WebExtension:InstallBuiltIn",
"GeckoView:WebExtension:List",
"GeckoView:WebExtension:PortDisconnect",
"GeckoView:WebExtension:PortMessageFromApp",
"GeckoView:WebExtension:SetPBAllowed",
"GeckoView:WebExtension:Uninstall",
"GeckoView:WebExtension:Update",
],
observers: [
"devtools-installed-addon",
"testing-installed-addon",
"testing-uninstalled-addon",
],
});
GeckoViewUtils.addLazyGetter(this, "ChildCrashHandler", {
module: "resource://gre/modules/ChildCrashHandler.jsm",
observers: ["ipc:content-shutdown", "compositor:process-aborted"],

Просмотреть файл

@ -211,47 +211,6 @@ var GeckoViewUtils = {
);
},
/**
* Add lazy event listeners on the per-window EventDispatcher, and only load
* the actual handler when an event is being handled.
*
* @param window Window with the target EventDispatcher.
* @param events Event name as a string or array.
* @param handler If specified, function that, for a given event, returns the
* actual event handler as an object or an array of objects.
* If handler is not specified, the actual event handler is
* specified using the scope and name pair.
* @param scope See handler.
* @param name See handler.
* @param once If true, only listen to the specified events once.
*/
registerLazyWindowEventListener(
window,
events,
{ handler, scope, name, once }
) {
const dispatcher = this.getDispatcherForWindow(window);
this._addLazyListeners(
events,
handler,
scope,
name,
(events, listener) => {
dispatcher.registerListener(listener, events);
},
(handlers, listener, args) => {
if (!once) {
dispatcher.unregisterListener(listener, args[0]);
handlers.forEach(handler =>
dispatcher.registerListener(handler, args[0])
);
}
handlers.forEach(handler => handler.onEvent(...args));
}
);
},
/**
* Add lazy pref observers, and only load the actual handler once the pref
* value changes from default, and every time the pref value changes