Bug 1381023: Follow-up: Fix xpcshell failure.
authorKris Maglione <maglione.k@gmail.com>
Fri, 14 Jul 2017 10:50:54 -0700
changeset 368960 52c077337a3bacde106e9da8497190d208ac5387
parent 368959 4b4898c8dc1569ec4a6097b2bcf661b0732ca4b9
child 368961 c9383f068d679013fdb0ff7c48871c9a7a81f0e0
push id92576
push usermaglione.k@gmail.com
push dateFri, 14 Jul 2017 17:54:49 +0000
treeherdermozilla-inbound@52c077337a3b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1381023
milestone56.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 1381023: Follow-up: Fix xpcshell failure. MozReview-Commit-ID: BB8ItETtRMb
toolkit/components/extensions/ExtensionParent.jsm
--- a/toolkit/components/extensions/ExtensionParent.jsm
+++ b/toolkit/components/extensions/ExtensionParent.jsm
@@ -240,21 +240,23 @@ ProxyMessenger = {
     let failures = 0;
     let tryPromise = async promise => {
       try {
         let res = await promise;
         if (result === undefined) {
           result = res;
         }
       } catch (e) {
-        if (e.result !== MessageChannel.RESULT_NO_HANDLER &&
-            e.result !== MessageChannel.RESULT_NO_RESPONSE) {
+        if (e.result === MessageChannel.RESULT_NO_RESPONSE) {
+          // Ignore.
+        } else if (e.result === MessageChannel.RESULT_NO_HANDLER) {
+          failures++;
+        } else {
           throw e;
         }
-        failures++;
       }
     };
 
     await Promise.all([tryPromise(promise1), tryPromise(promise2)]);
     if (failures == 2) {
       return Promise.reject(noHandlerError);
     }
     return result;