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

Unified Diff: Source/bindings/v8/ScriptController.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: Rebase. Created 7 years, 4 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/bindings/v8/ScriptController.h ('k') | Source/bindings/v8/V8Initializer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/ScriptController.cpp
diff --git a/Source/bindings/v8/ScriptController.cpp b/Source/bindings/v8/ScriptController.cpp
index 396b0228ca9987ec82502e857ba58e9aacedc9b2..3e1c2d9beb6d6c22fdbaa1153c3f71d8a062022d 100644
--- a/Source/bindings/v8/ScriptController.cpp
+++ b/Source/bindings/v8/ScriptController.cpp
@@ -206,7 +206,7 @@ v8::Local<v8::Value> ScriptController::callFunctionWithInstrumentation(ScriptExe
return result;
}
-v8::Local<v8::Value> ScriptController::compileAndRunScript(const ScriptSourceCode& source)
+v8::Local<v8::Value> ScriptController::compileAndRunScript(const ScriptSourceCode& source, AccessControlStatus corsStatus)
{
ASSERT(v8::Context::InContext());
@@ -226,7 +226,7 @@ v8::Local<v8::Value> ScriptController::compileAndRunScript(const ScriptSourceCod
// NOTE: For compatibility with WebCore, ScriptSourceCode's line starts at
// 1, whereas v8 starts at 0.
- v8::Handle<v8::Script> script = V8ScriptRunner::compileScript(code, source.url(), source.startPosition(), scriptData.get(), m_isolate);
+ v8::Handle<v8::Script> script = V8ScriptRunner::compileScript(code, source.url(), source.startPosition(), scriptData.get(), m_isolate, corsStatus);
// Keep Frame (and therefore ScriptController) alive.
RefPtr<Frame> protect(m_frame);
@@ -657,7 +657,7 @@ bool ScriptController::executeScriptIfJavaScriptURL(const KURL& url)
return true;
}
-ScriptValue ScriptController::executeScriptInMainWorld(const ScriptSourceCode& sourceCode)
+ScriptValue ScriptController::executeScriptInMainWorld(const ScriptSourceCode& sourceCode, AccessControlStatus corsStatus)
{
String sourceURL = sourceCode.url();
const String* savedSourceURL = m_sourceURL;
@@ -670,7 +670,7 @@ ScriptValue ScriptController::executeScriptInMainWorld(const ScriptSourceCode& s
v8::Context::Scope scope(v8Context);
RefPtr<Frame> protect(m_frame);
- v8::Local<v8::Value> object = compileAndRunScript(sourceCode);
+ v8::Local<v8::Value> object = compileAndRunScript(sourceCode, corsStatus);
m_sourceURL = savedSourceURL;
« no previous file with comments | « Source/bindings/v8/ScriptController.h ('k') | Source/bindings/v8/V8Initializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698