Permalink
Browse files

Closes #532 scripts are removed from content processes when uninstall…

…ed on Fennec now
  • Loading branch information...
erikvold committed Sep 5, 2011
1 parent 8114c71 commit 8780b5eaf09e979bed3b114b1aa6148217393d11
Showing with 13 additions and 0 deletions.
  1. +8 −0 extension/content/e10s/browser-content.js
  2. +5 −0 extension/modules/addonprovider.js
@@ -46,6 +46,14 @@ addMessageListener("Scriptish:ScriptChanged", function({json}) {
}
}
});
+addMessageListener("Scriptish:ScriptUninstalled", function({json}) {
+ for (var i = scripts.length - 1; ~i; i--) {
+ if (scripts[i].id == json) {
+ scripts.splice(i, 1);
+ return;
+ }
+ }
+});
})(Components.utils.import, {}, this);
@@ -111,6 +111,11 @@ const Scriptish_ScriptProvider = {
break;
case "scriptish-script-uninstalled":
AddonManagerPrivate.callAddonListeners("onUninstalled", script);
+
+ // notify content processes that a script is uninstalled
+ if ("Fennec" == Services.appinfo.name) {
+ Scriptish_sendAsyncE10SMessage("Scriptish:ScriptUninstalled", script.id);
+ }
break;
}
},

0 comments on commit 8780b5e

Please sign in to comment.