Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(837)

Unified Diff: Source/core/dom/ScriptLoader.cpp

Issue 956333002: Refactor TimeBase to post tasks. Workers to use real Idle tasks. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/dom/ScriptLoader.cpp
diff --git a/Source/core/dom/ScriptLoader.cpp b/Source/core/dom/ScriptLoader.cpp
index cd982a64aa58959bd88dd7d1267761e554a61992..a5881efde5aa69c9715d0a84c5522388f29eaa1f 100644
--- a/Source/core/dom/ScriptLoader.cpp
+++ b/Source/core/dom/ScriptLoader.cpp
@@ -322,6 +322,7 @@ bool isSVGScriptLoader(Element* element)
bool ScriptLoader::executeScript(const ScriptSourceCode& sourceCode, double* compilationFinishTime)
{
+ fprintf(stderr, "ScriptLoader::executeScript\n");
rmcilroy 2015/04/17 12:59:32 leftover debugging?
alex clarke (OOO till 29th) 2015/04/17 13:37:08 Done.
ASSERT(m_alreadyStarted);
if (sourceCode.isEmpty())
@@ -345,6 +346,7 @@ bool ScriptLoader::executeScript(const ScriptSourceCode& sourceCode, double* com
if (m_isExternalScript) {
ScriptResource* resource = m_resource ? m_resource.get() : sourceCode.resource();
+
if (resource && !resource->mimeTypeAllowedByNosniff()) {
contextDocument->addConsoleMessage(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."));
return false;

Powered by Google App Engine
This is Rietveld 408576698