зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1371888 - Stop having a sync IPC message to pass blocklist state, r=florian
Because plugin state in the content now contains blocklist state, and is updated when the blocklist updates, we don't need to ask the parent if we're checking blocklist state. All the consumers should now be asking the plugin code directly, so we can stub out the last API here. We should look at removing the content side of this service entirely, but that's something for a follow-up bug. MozReview-Commit-ID: DE8s8RwT42r --HG-- extra : rebase_source : 06fbc304e99679f55c7cdc52404cd138221feca3
This commit is contained in:
Родитель
ca508d989b
Коммит
a55246c7fc
|
@ -230,7 +230,6 @@ function Blocklist() {
|
|||
Services.prefs.addObserver(PREF_EM_LOGGING_ENABLED, this);
|
||||
this.wrappedJSObject = this;
|
||||
// requests from child processes come in here, see receiveMessage.
|
||||
Services.ppmm.addMessageListener("Blocklist:getPluginBlocklistState", this);
|
||||
Services.ppmm.addMessageListener("Blocklist:content-blocklist-updated", this);
|
||||
}
|
||||
|
||||
|
@ -256,7 +255,6 @@ Blocklist.prototype = {
|
|||
|
||||
shutdown() {
|
||||
Services.obs.removeObserver(this, "xpcom-shutdown");
|
||||
Services.ppmm.removeMessageListener("Blocklist:getPluginBlocklistState", this);
|
||||
Services.ppmm.removeMessageListener("Blocklist:content-blocklist-updated", this);
|
||||
Services.prefs.removeObserver("extensions.blocklist.", this);
|
||||
Services.prefs.removeObserver(PREF_EM_LOGGING_ENABLED, this);
|
||||
|
@ -294,10 +292,6 @@ Blocklist.prototype = {
|
|||
// Message manager message handlers
|
||||
receiveMessage(aMsg) {
|
||||
switch (aMsg.name) {
|
||||
case "Blocklist:getPluginBlocklistState":
|
||||
return this.getPluginBlocklistState(aMsg.data.addonData,
|
||||
aMsg.data.appVersion,
|
||||
aMsg.data.toolkitVersion);
|
||||
case "Blocklist:content-blocklist-updated":
|
||||
Services.obs.notifyObservers(null, "content-blocklist-updated");
|
||||
break;
|
||||
|
|
|
@ -89,13 +89,8 @@ Blocklist.prototype = {
|
|||
return true;
|
||||
},
|
||||
|
||||
// There are a few callers in layout that rely on this.
|
||||
getPluginBlocklistState(aPluginTag, aAppVersion, aToolkitVersion) {
|
||||
return Services.cpmm.sendSyncMessage("Blocklist:getPluginBlocklistState", {
|
||||
addonData: this.flattenObject(aPluginTag),
|
||||
appVersion: aAppVersion,
|
||||
toolkitVersion: aToolkitVersion
|
||||
})[0];
|
||||
throw new Error(kMissingAPIMessage);
|
||||
},
|
||||
|
||||
getAddonBlocklistURL(aAddon, aAppVersion, aToolkitVersion) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче