Index: Source/core/dom/ScriptLoader.cpp |
diff --git a/Source/core/dom/ScriptLoader.cpp b/Source/core/dom/ScriptLoader.cpp |
index d543044755e09cfa63293990e5452968cf6a8d1a..87aac33737c303420d111168db668826f59307e2 100644 |
--- a/Source/core/dom/ScriptLoader.cpp |
+++ b/Source/core/dom/ScriptLoader.cpp |
@@ -314,7 +314,8 @@ void ScriptLoader::executeScript(const ScriptSourceCode& sourceCode) |
if (m_isExternalScript) { |
ScriptResource* resource = m_resource ? m_resource.get() : sourceCode.resource(); |
if (resource && !resource->mimeTypeAllowedByNosniff()) { |
- contextDocument->addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, "Refused to execute script from '" + resource->url().elidedString() + "' because its MIME type ('" + resource->mimeType() + "') is not executable, and strict MIME type checking is enabled."); |
+ RefPtrWillBeRawPtr<ConsoleMessage> consoleError = ConsoleMessage::create(SecurityMessageSource, ErrorMessageLevel, "Refused to execute script from '" + resource->url().elidedString() + "' because its MIME type ('" + resource->mimeType() + "') is not executable, and strict MIME type checking is enabled.", "", 0, 0, nullptr, nullptr, 0, NotSharableCrossOrigin); |
+ contextDocument->addConsoleMessage(consoleError); |
return; |
} |
} |