зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1671184 - Don't send GeckoView settings to child processes. r=snorp
Now that GeckoViewSettingChild is an actor, nobody listens to settings in the child anymore. Differential Revision: https://phabricator.services.mozilla.com/D93512
This commit is contained in:
Родитель
8ed2ac71fb
Коммит
fb84d4b14d
|
@ -260,11 +260,6 @@ var ModuleManager = {
|
|||
module.impl.onSettingsUpdate();
|
||||
}
|
||||
});
|
||||
|
||||
this._browser.messageManager.sendAsyncMessage(
|
||||
"GeckoView:UpdateSettings",
|
||||
aSettings
|
||||
);
|
||||
},
|
||||
|
||||
onMessageFromActor(aActorName, aMessage) {
|
||||
|
@ -492,7 +487,7 @@ class ModuleInfo {
|
|||
}
|
||||
}
|
||||
|
||||
this._updateContentModuleState(/* includeSettings */ aEnabled);
|
||||
this._updateContentModuleState();
|
||||
}
|
||||
|
||||
receiveMessage(aMessage) {
|
||||
|
@ -504,20 +499,19 @@ class ModuleInfo {
|
|||
}
|
||||
|
||||
onContentModuleLoaded() {
|
||||
this._updateContentModuleState(/* includeSettings */ true);
|
||||
this._updateContentModuleState();
|
||||
|
||||
if (this._impl) {
|
||||
this._impl.onContentModuleLoaded();
|
||||
}
|
||||
}
|
||||
|
||||
_updateContentModuleState(aIncludeSettings) {
|
||||
_updateContentModuleState() {
|
||||
this._manager.messageManager.sendAsyncMessage(
|
||||
"GeckoView:UpdateModuleState",
|
||||
{
|
||||
module: this._name,
|
||||
enabled: this.enabled,
|
||||
settings: aIncludeSettings ? this._manager.settings : null,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -27,7 +27,6 @@ class GeckoViewChildModule {
|
|||
this.moduleName = aModuleName;
|
||||
this.messageManager = aGlobal;
|
||||
this.enabled = false;
|
||||
this.settings = {};
|
||||
|
||||
if (!aGlobal._gvEventDispatcher) {
|
||||
aGlobal._gvEventDispatcher = GeckoViewUtils.getDispatcherForWindow(
|
||||
|
@ -47,11 +46,6 @@ class GeckoViewChildModule {
|
|||
}
|
||||
this.eventDispatcher = aGlobal._gvEventDispatcher;
|
||||
|
||||
this.messageManager.addMessageListener("GeckoView:UpdateSettings", aMsg => {
|
||||
Object.assign(this.settings, aMsg.data);
|
||||
this.onSettingsUpdate();
|
||||
});
|
||||
|
||||
this.messageManager.addMessageListener(
|
||||
"GeckoView:UpdateModuleState",
|
||||
aMsg => {
|
||||
|
@ -59,11 +53,7 @@ class GeckoViewChildModule {
|
|||
return;
|
||||
}
|
||||
|
||||
const { enabled, settings } = aMsg.data;
|
||||
|
||||
if (settings) {
|
||||
Object.assign(this.settings, settings);
|
||||
}
|
||||
const { enabled } = aMsg.data;
|
||||
|
||||
if (enabled !== this.enabled) {
|
||||
if (!enabled) {
|
||||
|
@ -76,10 +66,6 @@ class GeckoViewChildModule {
|
|||
this.onEnable();
|
||||
}
|
||||
}
|
||||
|
||||
if (settings) {
|
||||
this.onSettingsUpdate();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -93,9 +79,6 @@ class GeckoViewChildModule {
|
|||
// Override to initialize module.
|
||||
onInit() {}
|
||||
|
||||
// Override to detect settings change. Access settings via this.settings.
|
||||
onSettingsUpdate() {}
|
||||
|
||||
// Override to enable module after setting a Java delegate.
|
||||
onEnable() {}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче