Bug 1464938: Stop needlessly waiting for responses to startup messages. r?aswan draft
authorKris Maglione <maglione.k@gmail.com>
Wed, 25 Jul 2018 12:05:22 -0700
changeset 822795 efac71705dce30b9eea05fad12cffe4307086af1
parent 822794 29ba4c1cf7f3bbb6b5f60931cb58f458dc1aaaf6
push id117474
push usermaglione.k@gmail.com
push dateWed, 25 Jul 2018 23:10:22 +0000
reviewersaswan
bugs1464938
milestone63.0a1
Bug 1464938: Stop needlessly waiting for responses to startup messages. r?aswan MozReview-Commit-ID: 328wmW1CZ9L
toolkit/components/extensions/Extension.jsm
--- a/toolkit/components/extensions/Extension.jsm
+++ b/toolkit/components/extensions/Extension.jsm
@@ -1635,19 +1635,19 @@ class Extension extends ExtensionData {
         promises.push(Management.asyncEmitManifestEntry(this, directive));
       }
     }
 
     activeExtensionIDs.add(this.id);
     sharedData.set("extensions/activeIDs", activeExtensionIDs);
 
     Services.ppmm.sharedData.flush();
-    return this.broadcast("Extension:Startup", this.id).then(() => {
-      return Promise.all(promises);
-    });
+    this.broadcast("Extension:Startup", this.id);
+
+    return Promise.all(promises);
   }
 
   /**
    * Call the close() method on the given object when this extension
    * is shut down.  This can happen during browser shutdown, or when
    * an extension is manually disabled or uninstalled.
    *
    * @param {object} obj