Bug 1567341 - Initialize GeckoViewWebExtensions when getting extension-installed. r=esawin

When getting the *-extension-installed messages we should always notify
GeckoViewWebExtension.

This currently works because we always install the test support extension which
causes us to initialize GeckoViewWebExtension. On xpcshel tests, however, there
is no support extension so we need to account for that in GeckoViewStartup.

Differential Revision: https://phabricator.services.mozilla.com/D106319
This commit is contained in:
Agi Sferro 2021-03-24 21:49:36 +00:00
Родитель 04b86a5bf7
Коммит 888d230519
2 изменённых файлов: 5 добавлений и 3 удалений

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

@ -94,6 +94,11 @@ class GeckoViewStartup {
"GeckoView:WebExtension:Uninstall",
"GeckoView:WebExtension:Update",
],
observers: [
"devtools-installed-addon",
"testing-installed-addon",
"testing-uninstalled-addon",
],
});
GeckoViewUtils.addLazyGetter(this, "GeckoViewStorageController", {

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

@ -1088,6 +1088,3 @@ var GeckoViewWebExtension = {
GeckoViewWebExtension.browserActions = new WeakMap();
// WeakMap[Extension -> PageAction]
GeckoViewWebExtension.pageActions = new WeakMap();
Services.obs.addObserver(GeckoViewWebExtension, "devtools-installed-addon");
Services.obs.addObserver(GeckoViewWebExtension, "testing-installed-addon");
Services.obs.addObserver(GeckoViewWebExtension, "testing-uninstalled-addon");