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

Unified Diff: Source/bindings/core/v8/custom/V8WindowCustom.cpp

Issue 1112843007: Fix frameElement for frames with a remote parent. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 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 | « no previous file | Source/core/frame/LocalDOMWindow.cpp » ('j') | Source/core/frame/LocalDOMWindow.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/custom/V8WindowCustom.cpp
diff --git a/Source/bindings/core/v8/custom/V8WindowCustom.cpp b/Source/bindings/core/v8/custom/V8WindowCustom.cpp
index 83a91efb6ce3d4033035bd2add6a7dcee31927b4..c0503922226f7cffead1facb6e9695b4bd5a5ab5 100644
--- a/Source/bindings/core/v8/custom/V8WindowCustom.cpp
+++ b/Source/bindings/core/v8/custom/V8WindowCustom.cpp
@@ -107,7 +107,8 @@ void V8Window::frameElementAttributeGetterCustom(const v8::PropertyCallbackInfo<
{
LocalDOMWindow* impl = toLocalDOMWindow(V8Window::toImpl(info.Holder()));
ExceptionState exceptionState(ExceptionState::GetterContext, "frame", "Window", info.Holder(), info.GetIsolate());
- if (!BindingSecurity::shouldAllowAccessToNode(info.GetIsolate(), impl->frameElement(), exceptionState)) {
+ Frame* target = impl->frame() ? impl->frame()->tree().parent() : nullptr;
+ if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), target, exceptionState)) {
v8SetReturnValueNull(info);
exceptionState.throwIfNeeded();
return;
« no previous file with comments | « no previous file | Source/core/frame/LocalDOMWindow.cpp » ('j') | Source/core/frame/LocalDOMWindow.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698