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

Unified Diff: Source/bindings/v8/V8Initializer.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.cpp ('k') | Source/bindings/v8/V8ScriptRunner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/V8Initializer.cpp
diff --git a/Source/bindings/v8/V8Initializer.cpp b/Source/bindings/v8/V8Initializer.cpp
index 7e709618e015fdb65c812005162df45194018fde..2263c1e18c24f165031d97d5a6d7880e6ad682ee 100644
--- a/Source/bindings/v8/V8Initializer.cpp
+++ b/Source/bindings/v8/V8Initializer.cpp
@@ -102,7 +102,8 @@ static void messageHandlerInMainThread(v8::Handle<v8::Message> message, v8::Hand
ASSERT(wrappedEvent->IsObject());
v8::Local<v8::Object>::Cast(wrappedEvent)->SetHiddenValue(V8HiddenPropertyName::error(), data);
}
- firstWindow->document()->reportException(event.release(), callStack);
+ AccessControlStatus corsStatus = message->IsSharedCrossOrigin() ? SharableCrossOrigin : NotSharableCrossOrigin;
+ firstWindow->document()->reportException(event.release(), callStack, corsStatus);
}
static void failedAccessCheckCallbackInMainThread(v8::Local<v8::Object> host, v8::AccessType type, v8::Local<v8::Value> data)
@@ -177,7 +178,8 @@ static void messageHandlerInWorker(v8::Handle<v8::Message> message, v8::Handle<v
ASSERT(wrappedEvent->IsObject());
v8::Local<v8::Object>::Cast(wrappedEvent)->SetHiddenValue(V8HiddenPropertyName::error(), data);
}
- context->reportException(event.release(), 0);
+ AccessControlStatus corsStatus = message->IsSharedCrossOrigin() ? SharableCrossOrigin : NotSharableCrossOrigin;
+ context->reportException(event.release(), 0, corsStatus);
}
isReportingException = false;
« no previous file with comments | « Source/bindings/v8/ScriptController.cpp ('k') | Source/bindings/v8/V8ScriptRunner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698