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

Issue 2668753006: Special-case LocalDOMWindow for same-origin access in bindings. (Closed)

Created:
3 years, 10 months ago by dcheng
Modified:
3 years, 10 months ago
Reviewers:
haraken, Yuki
CC:
chromium-reviews, shans, rjwright, blink-reviews-animation_chromium.org, hongchan, haraken, blink-reviews-bindings_chromium.org, darktears, blink-reviews, Raymond Toy, eric willigers_chromium.org, esprehn, ikilpatrick, panicker
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Special-case LocalDOMWindow for same-origin access in bindings. When generating IDL bindings for the Window interface, the bindings will now downcast to LocalDOMWindow if the access is a same-origin accesses. This allows for simplification of DOMWindow and its subclasses to be simpler and easier to understand: - Cross-origin behavior is more clearly highlighted as the shared base class only has a few virtual methods now. - Same-origin behavior is moved completely into LocalDOMWindow. - RemoteDOMWindow no longer has several dozen methods that simply ASSERT_NOT_REACHED(). - Partial window interfaces are now correctly anchored off LocalDOMWindow rather than requiring all implementations to downcast BUG=none Review-Url: https://codereview.chromium.org/2668753006 Cr-Commit-Position: refs/heads/master@{#448039} Committed: https://chromium.googlesource.com/chromium/src/+/8abb3475d41c011a9f573ea65200e7f16a9a4496

Patch Set 1 #

Patch Set 2 : Doc updates and binding test. #

Patch Set 3 : . #

Total comments: 8

Patch Set 4 : DCHECK more #

Patch Set 5 : Delete Oilpan TODO as infeasible #

Patch Set 6 : Just special case DOMWindow #

Total comments: 4

Patch Set 7 : Rebase and address comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+257 lines, -657 lines) Patch
M third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp View 1 chunk +5 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl View 1 2 3 4 5 6 2 chunks +14 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl View 1 2 3 4 5 6 1 chunk +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/DOMWindow.h View 1 2 3 4 5 6 5 chunks +1 line, -156 lines 0 comments Download
M third_party/WebKit/Source/core/frame/DOMWindow.cpp View 1 2 3 4 5 6 6 chunks +4 lines, -24 lines 0 comments Download
M third_party/WebKit/Source/core/frame/LocalDOMWindow.h View 1 2 3 4 5 6 3 chunks +145 lines, -62 lines 0 comments Download
M third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp View 1 2 3 4 5 6 4 chunks +17 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/LocalFrame.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/RemoteDOMWindow.h View 1 chunk +0 lines, -66 lines 0 comments Download
M third_party/WebKit/Source/core/frame/RemoteDOMWindow.cpp View 2 chunks +0 lines, -264 lines 0 comments Download
M third_party/WebKit/Source/core/loader/FrameLoader.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/timing/Performance.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/timing/Performance.cpp View 1 2 3 4 5 6 2 chunks +6 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/timing/PerformanceTest.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/compositorworker/WindowAnimationWorklet.h View 2 chunks +4 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/modules/compositorworker/WindowAnimationWorklet.cpp View 1 2 3 4 2 chunks +24 lines, -31 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/WindowAudioWorklet.h View 2 chunks +4 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/WindowAudioWorklet.cpp View 1 2 3 4 2 chunks +22 lines, -28 lines 0 comments Download

Messages

Total messages: 31 (18 generated)
dcheng
https://codereview.chromium.org/2668753006/diff/40001/third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp File third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp (right): https://codereview.chromium.org/2668753006/diff/40001/third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp#newcode221 third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp:221: Document* document = toLocalDOMWindow(target)->document(); I am considering moving SecurityContext ...
3 years, 10 months ago (2017-02-01 07:22:59 UTC) #4
Yuki
Looks great in general. Thinking about same origin vs cross origin and local frame vs ...
3 years, 10 months ago (2017-02-01 07:54:36 UTC) #8
dcheng
On 2017/02/01 07:54:36, Yuki wrote: > Looks great in general. > > Thinking about same ...
3 years, 10 months ago (2017-02-01 08:00:53 UTC) #9
Yuki
On 2017/02/01 08:00:53, dcheng wrote: > On 2017/02/01 07:54:36, Yuki wrote: > > Looks great ...
3 years, 10 months ago (2017-02-01 08:23:19 UTC) #10
haraken
A couple of questions: > Hmmm... the reason I picked same origin is because same ...
3 years, 10 months ago (2017-02-01 08:32:01 UTC) #11
dcheng
On 2017/02/01 08:23:19, Yuki wrote: > On 2017/02/01 08:00:53, dcheng wrote: > > On 2017/02/01 ...
3 years, 10 months ago (2017-02-01 18:00:13 UTC) #14
dcheng
On 2017/02/01 08:32:01, haraken wrote: > A couple of questions: > > > Hmmm... the ...
3 years, 10 months ago (2017-02-01 18:30:28 UTC) #17
Yuki
Could you update the subject and the description of the CL? Then, LGTM.
3 years, 10 months ago (2017-02-02 05:53:55 UTC) #20
dcheng
On 2017/02/02 05:53:55, Yuki wrote: > Could you update the subject and the description of ...
3 years, 10 months ago (2017-02-02 05:56:34 UTC) #22
haraken
Sorry about the review delay. LGTM. https://codereview.chromium.org/2668753006/diff/100001/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl File third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl (right): https://codereview.chromium.org/2668753006/diff/100001/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl#newcode47 third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl:47: LocalDOMWindow* impl = ...
3 years, 10 months ago (2017-02-03 09:03:18 UTC) #23
dcheng
https://codereview.chromium.org/2668753006/diff/100001/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl File third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl (right): https://codereview.chromium.org/2668753006/diff/100001/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl#newcode47 third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl:47: LocalDOMWindow* impl = toLocalDOMWindow({{v8_class}}::toImpl(holder)); On 2017/02/03 09:03:18, haraken wrote: ...
3 years, 10 months ago (2017-02-03 10:04:26 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2668753006/120001
3 years, 10 months ago (2017-02-03 17:13:00 UTC) #28
commit-bot: I haz the power
3 years, 10 months ago (2017-02-03 19:21:55 UTC) #31
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/8abb3475d41c011a9f573ea65200...

Powered by Google App Engine
This is Rietveld 408576698