Bug 1308688 followup r=kmag
authorAndrew Swan <aswan@mozilla.com>
Thu, 01 Dec 2016 10:35:16 -0800
changeset 325035 6d05dfdbfac25ffb73193b11f1c951f66bee4544
parent 325034 2b38638df04ddb0d688909b0286bf5452c879c18
child 325036 94cfc36186f3618482f59e42e5fb0f7e307c1c92
push id31026
push usercbook@mozilla.com
push dateFri, 02 Dec 2016 08:24:04 +0000
treeherdermozilla-central@f65ad27efe83 [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);