Bug 1178818 - Don't use promises in DOMApplicationRegistry proxy object. r=myk
authorEugen Sawin <esawin@mozilla.com>
Fri, 10 Jul 2015 14:30:04 +0200
changeset 252285 04a66937c275dc5a01aaad56835cfe2922dd178f
parent 252284 31fef8afde5a9cc5d96e72318a320e1b52e9ead8
child 252286 ff297c4e78a1af1a2d530ae6a03aa242a435ee15
push id62109
push useresawin@mozilla.com
push dateFri, 10 Jul 2015 12:31:06 +0000
treeherdermozilla-inbound@04a66937c275 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmyk
bugs1178818
milestone42.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1178818 - Don't use promises in DOMApplicationRegistry proxy object. r=myk
mobile/android/chrome/content/browser.js
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -298,20 +298,18 @@ XPCOMUtils.defineLazyModuleGetter(
       this.ppmm.removeMessageListener(msgName, this);
     });
   },
   {
     receiveMessage: function() {
       // This is called only once when we receive a message for the first time.
       // With this, we trigger the import of Webapps.jsm and forward the message
       // to the real registry.
-      DOMApplicationRegistry.registryReady.then(() => {
-        DOMApplicationRegistry.receiveMessage.apply(
-            DOMApplicationRegistry, arguments);
-      });
+      return DOMApplicationRegistry.receiveMessage.apply(
+          DOMApplicationRegistry, arguments);
     }
   }
 );
 
 XPCOMUtils.defineLazyModuleGetter(this, "Log",
   "resource://gre/modules/AndroidLog.jsm", "AndroidLog");
 
 // Define the "dump" function as a binding of the Log.d function so it specifies