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

Unified Diff: Source/core/html/parser/HTMLScriptRunner.cpp

Issue 1010433007: Fire error event when script integrity check fails. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated comment Created 5 years, 9 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
« no previous file with comments | « Source/core/dom/ScriptLoader.cpp ('k') | Source/core/xml/parser/XMLDocumentParser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/HTMLScriptRunner.cpp
diff --git a/Source/core/html/parser/HTMLScriptRunner.cpp b/Source/core/html/parser/HTMLScriptRunner.cpp
index 2db20e2aebadc2c46285bf4a52699e25d1a8e36a..304fe38a66363dce7be77f57450579557291cec7 100644
--- a/Source/core/html/parser/HTMLScriptRunner.cpp
+++ b/Source/core/html/parser/HTMLScriptRunner.cpp
@@ -152,8 +152,11 @@ void HTMLScriptRunner::executePendingScriptAndDispatchEvent(PendingScript& pendi
scriptLoader->dispatchErrorEvent();
else {
ASSERT(isExecutingScript());
- scriptLoader->executeScript(sourceCode, &compilationFinishTime);
- element->dispatchEvent(createScriptLoadEvent());
+ if (!scriptLoader->executeScript(sourceCode, &compilationFinishTime)) {
+ scriptLoader->dispatchErrorEvent();
+ } else {
+ element->dispatchEvent(createScriptLoadEvent());
+ }
}
}
// The exact value doesn't matter; valid time stamps are much bigger than this value.
« no previous file with comments | « Source/core/dom/ScriptLoader.cpp ('k') | Source/core/xml/parser/XMLDocumentParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698