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 496667 d0b593b6d065227a080fc483eb73919dc020a2de
parent 496666 74ee6e2258c119cb2795b74f836fac35d3679448
child 496668 620be2ce2c8c8f346f4fa30a167e7c6afd995fd1
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersFelipe
bugs1493973
milestone64.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 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",