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

Unified Diff: Source/core/xml/parser/XMLDocumentParser.cpp

Issue 47923008: Block execution of failed 'crossorigin' <script>s. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Minimize code changes + remove redundant leftovers. Created 7 years, 2 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/xml/parser/XMLDocumentParser.cpp
diff --git a/Source/core/xml/parser/XMLDocumentParser.cpp b/Source/core/xml/parser/XMLDocumentParser.cpp
index 5d6a1eb3d4c5e97c2758b9baf21b03cabc80af36..5be6fc02007d0d66b2c181d7bccaa1965bc252db 100644
--- a/Source/core/xml/parser/XMLDocumentParser.cpp
+++ b/Source/core/xml/parser/XMLDocumentParser.cpp
@@ -474,8 +474,8 @@ void XMLDocumentParser::notifyFinished(Resource* unusedResource)
if (errorOccurred)
scriptLoader->dispatchErrorEvent();
else if (!wasCanceled) {
- scriptLoader->executeScript(sourceCode);
- scriptLoader->dispatchLoadEvent();
+ if (scriptLoader->executePotentiallyCrossOriginScript(sourceCode))
+ scriptLoader->dispatchLoadEvent();
}
m_scriptElement = 0;
« Source/core/html/parser/HTMLScriptRunner.cpp ('K') | « Source/core/html/parser/HTMLScriptRunner.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698