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

Unified Diff: Source/core/frame/LocalDOMWindow.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 | « Source/bindings/core/v8/custom/V8WindowCustom.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/LocalDOMWindow.cpp
diff --git a/Source/core/frame/LocalDOMWindow.cpp b/Source/core/frame/LocalDOMWindow.cpp
index fcbedc571a32e4330605e33fe2ac5c88734d7b2e..80f0a386bc1a4ee58c73934e9478e0c70290ae2b 100644
--- a/Source/core/frame/LocalDOMWindow.cpp
+++ b/Source/core/frame/LocalDOMWindow.cpp
@@ -733,7 +733,7 @@ DOMSelection* LocalDOMWindow::getSelection()
Element* LocalDOMWindow::frameElement() const
{
- if (!frame())
+ if (!frame() || (frame()->owner() && !frame()->owner()->isLocal()))
alexmos 2015/04/30 20:45:26 The comment about the binding security check below
dcheng 2015/04/30 20:58:51 I'd prefer to just hit the assert below. deprecate
alexmos 2015/04/30 21:12:58 Sounds good -- done.
return nullptr;
// The bindings security check should ensure we're same origin...
« no previous file with comments | « Source/bindings/core/v8/custom/V8WindowCustom.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698