Bug 1308688. r=kmag, a=gchang
authorAndrew Swan <aswan@mozilla.com>
Thu, 01 Dec 2016 10:15:47 -0800
changeset 356846 df6600c5e97daa02d4eeff2758da2ed325a51d85
parent 356845 7f9a7d1ed122ca49ae05e4e4ee42ab51418407b5
child 356847 c0a36f11f8de3646778392461ab776f09cfbc802
push id6649
push userryanvm@gmail.com
push dateThu, 01 Dec 2016 19:21:39 +0000
treeherdermozilla-beta@df6600c5e97d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskmag, gchang
bugs1308688
milestone51.0
Bug 1308688. r=kmag, a=gchang MozReview-Commit-ID: IcH7YXuEJbW
toolkit/modules/addons/WebRequest.jsm
--- a/toolkit/modules/addons/WebRequest.jsm
+++ b/toolkit/modules/addons/WebRequest.jsm
@@ -597,19 +597,24 @@ HttpObserverManager = {
 
       let result = null;
       try {
         result = callback(data);
       } catch (e) {
         Cu.reportError(e);
       }
 
-      if (!result || !opts.blocking) {
+      if (!result || !opts.blocking
+          || AddonManagerPermissions.isHostPermitted(uri.host)
+          || (loadInfo && loadInfo.loadingPrincipal
+              && loadInfo.loadingPrincipal.URI
+              && AddonManagerPermissions.isHostPermitted(loadInfo.loadingPrincipal.URI.host))) {
         continue;
       }
+
       if (result.cancel) {
         channel.cancel(Cr.NS_ERROR_ABORT);
         this.errorCheck(channel, loadContext);
         return false;
       }
       if (result.redirectUrl) {
         channel.redirectTo(BrowserUtils.makeURI(result.redirectUrl));
         return false;