From fb84d4b14d942bd693f94daf3a0ce4f88dc0957a Mon Sep 17 00:00:00 2001 From: Agi Sferro Date: Wed, 14 Oct 2020 17:26:02 +0000 Subject: [PATCH] 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 --- mobile/android/chrome/geckoview/geckoview.js | 12 +++--------- .../geckoview/GeckoViewChildModule.jsm | 19 +------------------ 2 files changed, 4 insertions(+), 27 deletions(-) diff --git a/mobile/android/chrome/geckoview/geckoview.js b/mobile/android/chrome/geckoview/geckoview.js index ac39418a013b..88b2febb37ed 100644 --- a/mobile/android/chrome/geckoview/geckoview.js +++ b/mobile/android/chrome/geckoview/geckoview.js @@ -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, } ); } diff --git a/mobile/android/modules/geckoview/GeckoViewChildModule.jsm b/mobile/android/modules/geckoview/GeckoViewChildModule.jsm index ea7387b955db..77b70a960cd3 100644 --- a/mobile/android/modules/geckoview/GeckoViewChildModule.jsm +++ b/mobile/android/modules/geckoview/GeckoViewChildModule.jsm @@ -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() {}