Chromium Code Reviews| Index: third_party/WebKit/Source/core/dom/ScriptLoader.cpp |
| diff --git a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp |
| index a7b90c6739fafc8dca761bb50c11c5a5d3962981..42cb86e7da86a13dc4e24e90627f050c5f46edb4 100644 |
| --- a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp |
| +++ b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp |
| @@ -350,9 +350,9 @@ bool ScriptLoader::executeScript(const ScriptSourceCode& sourceCode, double* com |
| const ContentSecurityPolicy* csp = elementDocument->contentSecurityPolicy(); |
| bool shouldBypassMainWorldCSP = (frame && frame->script().shouldBypassMainWorldCSP()) |
| || csp->allowScriptWithNonce(m_element->fastGetAttribute(HTMLNames::nonceAttr)) |
| - || csp->allowScriptWithHash(sourceCode.source()); |
| + || csp->allowScriptWithHash(sourceCode.source().toString()); |
| - if (!m_isExternalScript && (!shouldBypassMainWorldCSP && !csp->allowInlineScript(elementDocument->url(), m_startLineNumber, sourceCode.source()))) { |
| + if (!m_isExternalScript && (!shouldBypassMainWorldCSP && !csp->allowInlineScript(elementDocument->url(), m_startLineNumber, sourceCode.source().toString()))) { |
| return false; |
| } |
| @@ -400,6 +400,7 @@ bool ScriptLoader::executeScript(const ScriptSourceCode& sourceCode, double* com |
| // Create a script from the script element node, using the script |
| // block's source and the script block's type. |
| // Note: This is where the script is compiled and actually executed. |
| + |
|
hajimehoshi
2015/11/26 10:56:20
nit
|
| frame->script().executeScriptInMainWorld(sourceCode, accessControlStatus, compilationFinishTime); |
| if (isHTMLScriptLoader(m_element)) { |