Bug 1308688 followup. r=kmag, a=gchang
authorAndrew Swan <aswan@mozilla.com>
Thu, 01 Dec 2016 10:35:16 -0800
changeset 349450 df4d31969686336bdfbc6d4fe876af5bc4619183
parent 349449 776b92e3ec431a94b96ee3b898eecc781f73d99a
child 349451 5e17b3d541189991000429d69b22d80d0f6f716f
push id10386
push userryanvm@gmail.com
push dateThu, 01 Dec 2016 19:17:21 +0000
treeherdermozilla-aurora@d59e82481c86 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskmag, gchang
bugs1308688
milestone52.0a2
Bug 1308688 followup. r=kmag, a=gchang MozReview-Commit-ID: GPPJm1Hlx88
toolkit/modules/addons/WebRequest.jsm
--- a/toolkit/modules/addons/WebRequest.jsm
+++ b/toolkit/modules/addons/WebRequest.jsm
@@ -711,18 +711,19 @@ HttpObserverManager = {
           mergeStatus(data, channel, kind);
         }
 
         try {
           let result = callback(data);
 
           if (result && typeof result === "object" && opts.blocking
               && !AddonManagerPermissions.isHostPermitted(uri.host)
-              && loadInfo && loadInfo.loadingPrincipal && loadInfo.loadingPrincipal.URI
-              && !AddonManagerPermissions.isHostPermitted(loadInfo.loadingPrincipal.URI.host)) {
+              && (!loadInfo || !loadInfo.loadingPrincipal
+                  || !loadInfo.loadingPrincipal.URI
+                  || !AddonManagerPermissions.isHostPermitted(loadInfo.loadingPrincipal.URI.host))) {
             handlerResults.push({opts, result});
           }
         } catch (e) {
           Cu.reportError(e);
         }
       }
     } catch (e) {
       Cu.reportError(e);