Bug 1493973 - Don't block devtools when block chrome URLs r=Felipe
authorMichael Kaply <mozilla@kaply.com>
Fri, 12 Oct 2018 19:48:19 +0000
changeset 489392 d0b593b6d065227a080fc483eb73919dc020a2de
parent 489391 74ee6e2258c119cb2795b74f836fac35d3679448
child 489393 620be2ce2c8c8f346f4fa30a167e7c6afd995fd1
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewersFelipe
bugs1493973
milestone64.0a1
Bug 1493973 - Don't block devtools when block chrome URLs r=Felipe Differential Revision: https://phabricator.services.mozilla.com/D8591
browser/components/enterprisepolicies/Policies.jsm
--- a/browser/components/enterprisepolicies/Policies.jsm
+++ b/browser/components/enterprisepolicies/Policies.jsm
@@ -1009,17 +1009,18 @@ function blockAboutPage(manager, feature
 
 let ChromeURLBlockPolicy = {
   shouldLoad(contentLocation, loadInfo, mimeTypeGuess) {
     let contentType = loadInfo.externalContentPolicyType;
     if (contentLocation.scheme == "chrome" &&
         contentType == Ci.nsIContentPolicy.TYPE_DOCUMENT &&
         loadInfo.loadingContext &&
         loadInfo.loadingContext.baseURI == AppConstants.BROWSER_CHROME_URL &&
-        contentLocation.host != "mochitests") {
+        contentLocation.host != "mochitests" &&
+        contentLocation.host != "devtools") {
       return Ci.nsIContentPolicy.REJECT_REQUEST;
     }
     return Ci.nsIContentPolicy.ACCEPT;
   },
   shouldProcess(contentLocation, loadInfo, mimeTypeGuess) {
     return Ci.nsIContentPolicy.ACCEPT;
   },
   classDescription: "Policy Engine Content Policy",