Bug 1308688 followup r=kmag
authorAndrew Swan <aswan@mozilla.com>
Thu, 01 Dec 2016 10:35:16 -0800
changeset 324966 6d05dfdbfac25ffb73193b11f1c951f66bee4544
parent 324965 2b38638df04ddb0d688909b0286bf5452c879c18
child 324967 94cfc36186f3618482f59e42e5fb0f7e307c1c92
push id84565
push useraswan@mozilla.com
push dateThu, 01 Dec 2016 19:12:39 +0000
treeherdermozilla-inbound@6d05dfdbfac2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskmag
bugs1308688
milestone53.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 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);