| Index: Source/core/dom/ScriptLoader.cpp
|
| diff --git a/Source/core/dom/ScriptLoader.cpp b/Source/core/dom/ScriptLoader.cpp
|
| index e9189835e5afef00793d27bb6ea105529484d582..4cf45bb77a6198f86a7aba742445d9c9b8f38612 100644
|
| --- a/Source/core/dom/ScriptLoader.cpp
|
| +++ b/Source/core/dom/ScriptLoader.cpp
|
| @@ -335,10 +335,14 @@ void ScriptLoader::executeScript(const ScriptSourceCode& sourceCode)
|
| if (isHTMLScriptLoader(m_element))
|
| executingDocument->pushCurrentScript(toHTMLScriptElement(m_element));
|
|
|
| + AccessControlStatus corsCheck = NotSharableCrossOrigin;
|
| + if (sourceCode.cachedScript() && sourceCode.cachedScript()->passesAccessControlCheck(m_element->document()->securityOrigin()))
|
| + corsCheck = SharableCrossOrigin;
|
| +
|
| // 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.
|
| - frame->script()->executeScriptInMainWorld(sourceCode);
|
| + frame->script()->executeScriptInMainWorld(sourceCode, corsCheck);
|
|
|
| if (isHTMLScriptLoader(m_element)) {
|
| ASSERT(executingDocument->currentScript() == m_element);
|
|
|