Bug 1313125 - Get rid of needless synchronous message from AppsServiceChild.jsm. r?jryans draft
authorMike Conley <mconley@mozilla.com>
Thu, 03 Nov 2016 13:59:35 -0400
changeset 433451 e4c4130501f354237c300a0d4a9a55b2e5e1c369
parent 432738 3bfde35a0d18a643485ffd5073f3bc6a79e0ae48
child 535889 789cc8625efeae6ebe9673f60efdc3551654a655
push id34578
push usermconley@mozilla.com
push dateThu, 03 Nov 2016 18:04:50 +0000
reviewersjryans
bugs1313125
milestone52.0a1
Bug 1313125 - Get rid of needless synchronous message from AppsServiceChild.jsm. r?jryans MozReview-Commit-ID: DHbylEOEaKB
dom/apps/AppsServiceChild.jsm
--- a/dom/apps/AppsServiceChild.jsm
+++ b/dom/apps/AppsServiceChild.jsm
@@ -98,23 +98,17 @@ this.DOMApplicationRegistry = {
   init: function init() {
     this.cpmm = Cc["@mozilla.org/childprocessmessagemanager;1"]
                   .getService(Ci.nsISyncMessageSender);
 
     APPS_IPC_MSG_NAMES.forEach((function(aMsgName) {
       this.cpmm.addMessageListener(aMsgName, this);
     }).bind(this));
 
-    this.cpmm.sendAsyncMessage("Webapps:RegisterForMessages", {
-      messages: APPS_IPC_MSG_NAMES
-    });
-
-    // We need to prime the cache with the list of apps.
-    let list = this.cpmm.sendSyncMessage("Webapps:GetList", { })[0];
-    this.webapps = list ? list.webapps : { };
+    this.webapps = { };
     // We need a fast mapping from localId -> app, so we add an index.
     // We also add the manifest to the app object.
     this.localIdIndex = { };
     for (let id in this.webapps) {
       let app = this.webapps[id];
       this.localIdIndex[app.localId] = app;
       app.manifest = list.manifests[id];
     }