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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp

Issue 2439013002: Implement cross-origin attributes using access check interceptors. (Closed)
Patch Set: . Created 4 years 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: third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp b/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp
index 5f3cbb313601fc180790f6d20305d5bcaf61d174..a577297ba821c5efbb75a9205fb103487ed75403 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp
@@ -291,19 +291,9 @@ static void failedAccessCheckCallbackInMainThread(v8::Local<v8::Object> host,
v8::Local<v8::Value> data) {
v8::Isolate* isolate = v8::Isolate::GetCurrent();
Frame* target = findFrame(isolate, host, data);
- if (!target)
- return;
- DOMWindow* targetWindow = target->domWindow();
-
// FIXME: We should modify V8 to pass in more contextual information (context,
// property, and object).
- ExceptionState exceptionState(ExceptionState::UnknownContext, 0, 0,
- isolate->GetCurrentContext()->Global(),
- isolate);
- exceptionState.throwSecurityError(
- targetWindow->sanitizedCrossDomainAccessErrorMessage(
- currentDOMWindow(isolate)),
- targetWindow->crossDomainAccessErrorMessage(currentDOMWindow(isolate)));
+ BindingSecurity::failedAccessCheckFor(isolate, target);
}
static bool codeGenerationCheckCallbackInMainThread(

Powered by Google App Engine
This is Rietveld 408576698