Bug 1316826 - Fix-up for JS URLs. r=dveditz a=dveditz
authorFrederik Braun <fbraun+gh@mozilla.com>
Mon, 28 Nov 2016 21:56:35 -0500
changeset 352713 42a574257cf3e61878f028fdbd731be82cd37928
parent 352712 301ee24e31a20fd438465c18b95731586e690f71
child 352714 e3e01366879b333b27d6ca0b51dae14b24b90cf9
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdveditz, dveditz
bugs1316826
milestone52.0a2
Bug 1316826 - Fix-up for JS URLs. r=dveditz a=dveditz MozReview-Commit-ID: 9VCSl0POR1m
dom/jsurl/nsJSProtocolHandler.cpp
--- a/dom/jsurl/nsJSProtocolHandler.cpp
+++ b/dom/jsurl/nsJSProtocolHandler.cpp
@@ -178,17 +178,17 @@ nsresult nsJSThunk::EvaluateScript(nsICh
     // allowed.
     nsCOMPtr<nsIContentSecurityPolicy> csp;
     rv = principal->GetCsp(getter_AddRefs(csp));
     NS_ENSURE_SUCCESS(rv, rv);
     if (csp) {
         bool allowsInlineScript = true;
         rv = csp->GetAllowsInline(nsIContentPolicy::TYPE_SCRIPT,
                                   EmptyString(), // aNonce
-                                  false,         // aParserCreated
+                                  true,         // aParserCreated
                                   EmptyString(), // aContent
                                   0,             // aLineNumber
                                   &allowsInlineScript);
 
         //return early if inline scripts are not allowed
         if (!allowsInlineScript) {
           return NS_ERROR_DOM_RETVAL_UNDEFINED;
         }