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

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

Issue 19596004: Allow sites to enable 'window.onerror' handlers for cross-domain scripts. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: WTF::HashSet FTW! Created 7 years, 5 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 c71bd21fda83a557caa735aa5a07ca44ef74ddd8..50b120c43ec81a61ef75a083c15cfd70bba817f3 100644
--- a/Source/core/dom/ScriptLoader.cpp
+++ b/Source/core/dom/ScriptLoader.cpp
@@ -324,6 +324,9 @@ void ScriptLoader::executeScript(const ScriptSourceCode& sourceCode)
if (isHTMLScriptLoader(m_element))
document->pushCurrentScript(toHTMLScriptElement(m_element));
+ if (!m_element->fastGetAttribute(HTMLNames::crossoriginAttr).isNull() && sourceCode.cachedScript() && sourceCode.cachedScript()->passesAccessControlCheck(m_element->document()->securityOrigin()))
+ m_element->document()->didLoadScriptThatPassedAccessControlCheck(sourceCode.cachedScript()->url());
+
// 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.
« Source/core/dom/ScriptExecutionContext.cpp ('K') | « Source/core/dom/ScriptExecutionContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698