Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(33)

Issue 1112843007: Fix frameElement for frames with a remote parent. (Closed)

Created:
5 years ago by alexmos
Modified:
5 years ago
Reviewers:
haraken, dcheng
CC:
arv+blink, blink-reviews, blink-reviews-bindings_chromium.org, site-isolation-reviews_chromium.org, vivekg_samsung, vivekg
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Fix frameElement for frames with a remote parent. Previously, accessing window.frameElement on a frame with a remote parent crashed due to the assert in LocalDOMWindow::frameElement(). This CL fixes things so that we properly throw an exception in that case. BUG=479394 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=194830

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 3

Patch Set 4 : Address Daniel's comment #

Total comments: 2

Patch Set 5 : Remove redundant ASSERT #

Patch Set 6 : Add comment about doing the access check on the frame vs node. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -3 lines) Patch
M Source/bindings/core/v8/custom/V8WindowCustom.cpp View 1 2 3 4 5 1 chunk +7 lines, -1 line 0 comments Download
M Source/core/frame/LocalDOMWindow.cpp View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M Source/web/tests/WebFrameTest.cpp View 1 1 chunk +22 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (3 generated)
alexmos
haraken@: please take a look. dcheng@: you may want to review this as well, plus ...
5 years ago (2015-04-30 20:45:26 UTC) #2
dcheng
https://codereview.chromium.org/1112843007/diff/40001/Source/core/frame/LocalDOMWindow.cpp File Source/core/frame/LocalDOMWindow.cpp (right): https://codereview.chromium.org/1112843007/diff/40001/Source/core/frame/LocalDOMWindow.cpp#newcode736 Source/core/frame/LocalDOMWindow.cpp:736: if (!frame() || (frame()->owner() && !frame()->owner()->isLocal())) On 2015/04/30 20:45:26, ...
5 years ago (2015-04-30 20:58:52 UTC) #3
alexmos
https://codereview.chromium.org/1112843007/diff/40001/Source/core/frame/LocalDOMWindow.cpp File Source/core/frame/LocalDOMWindow.cpp (right): https://codereview.chromium.org/1112843007/diff/40001/Source/core/frame/LocalDOMWindow.cpp#newcode736 Source/core/frame/LocalDOMWindow.cpp:736: if (!frame() || (frame()->owner() && !frame()->owner()->isLocal())) On 2015/04/30 20:58:51, ...
5 years ago (2015-04-30 21:12:58 UTC) #4
dcheng
Source/core and the test changes lgtm, with one nit https://codereview.chromium.org/1112843007/diff/60001/Source/core/frame/LocalDOMWindow.cpp File Source/core/frame/LocalDOMWindow.cpp (right): https://codereview.chromium.org/1112843007/diff/60001/Source/core/frame/LocalDOMWindow.cpp#newcode740 Source/core/frame/LocalDOMWindow.cpp:740: ...
5 years ago (2015-04-30 21:18:13 UTC) #5
alexmos
https://codereview.chromium.org/1112843007/diff/60001/Source/core/frame/LocalDOMWindow.cpp File Source/core/frame/LocalDOMWindow.cpp (right): https://codereview.chromium.org/1112843007/diff/60001/Source/core/frame/LocalDOMWindow.cpp#newcode740 Source/core/frame/LocalDOMWindow.cpp:740: ASSERT(!frame()->owner() || frame()->owner()->isLocal()); On 2015/04/30 21:18:13, dcheng wrote: > ...
5 years ago (2015-04-30 22:29:57 UTC) #6
haraken
Or would it make sense to keep impl->frameElement() in the binding layer by making LocalDOMWindow::frameElement() ...
5 years ago (2015-05-01 00:12:21 UTC) #7
alexmos
On 2015/05/01 00:12:21, haraken wrote: > Or would it make sense to keep impl->frameElement() in ...
5 years ago (2015-05-01 00:43:12 UTC) #8
haraken
On 2015/05/01 00:43:12, alexmos wrote: > On 2015/05/01 00:12:21, haraken wrote: > > Or would ...
5 years ago (2015-05-01 01:11:29 UTC) #9
alexmos
> Ah, that makes sense. We need to do the access check against the frame, ...
5 years ago (2015-05-01 18:38:53 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1112843007/100001
5 years ago (2015-05-01 18:40:33 UTC) #13
commit-bot: I haz the power
5 years ago (2015-05-01 20:33:47 UTC) #14
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=194830

Powered by Google App Engine
This is Rietveld 408576698