Bug 1308688 followup r=kmag
authorAndrew Swan <aswan@mozilla.com>
Thu, 01 Dec 2016 10:35:16 -0800
changeset 325068 6d05dfdbfac25ffb73193b11f1c951f66bee4544
parent 325067 2b38638df04ddb0d688909b0286bf5452c879c18
child 325069 94cfc36186f3618482f59e42e5fb0f7e307c1c92
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewerskmag
bugs1308688
milestone53.0a1
Bug 1308688 followup r=kmag MozReview-Commit-ID: GPPJm1Hlx88
toolkit/modules/addons/WebRequest.jsm
--- a/toolkit/modules/addons/WebRequest.jsm
+++ b/toolkit/modules/addons/WebRequest.jsm
@@ -717,18 +717,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);