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

Issue 2620313002: Refactor WindowProxy into Local and Remote subclasses. (Closed)

Created:
3 years, 11 months ago by dcheng
Modified:
3 years, 11 months ago
Reviewers:
haraken, Yuki
CC:
chromium-reviews, blink-reviews, mlamouri+watch-blink_chromium.org, blink-reviews-bindings_chromium.org, dcheng
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor WindowProxy into Local and Remote subclasses. WindowProxy for remote frames will soon use remote contexts to avoid the overhead of instantiating a full v8::Context. As preparation, separate the logic for WindowProxy into LocalFrame and RemoteFrame versions to make it obvious what's used in each path. To avoid adding virtual calls to the fast path, common members such as the lifecycle state and the global proxy have been moved to the base class. When the WindowProxy is already initialized, this avoids the cost of any virtual calls. Future CLs will: - Convert RemoteWindowProxy to use v8::Context::NewRemoteContext - Merge LocalWindowProxyManager back into ScriptController - Clean up the interface for transferring global objects - Clean up the layering between WindowProxy and its subclasses BUG=527190 Review-Url: https://codereview.chromium.org/2620313002 Cr-Commit-Position: refs/heads/master@{#442948} Committed: https://chromium.googlesource.com/chromium/src/+/690c3cf203b94623e5adbece7d6b4afc3501cd94

Patch Set 1 #

Patch Set 2 : --similarity=15 #

Patch Set 3 : Restore original security token logic #

Patch Set 4 : Cleanup comments #

Total comments: 25

Patch Set 5 : address comments #

Total comments: 6

Patch Set 6 : explicit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+373 lines, -994 lines) Patch
M third_party/WebKit/Source/bindings/bindings.gni View 2 chunks +4 lines, -0 lines 0 comments Download
A + third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.h View 1 2 3 4 3 chunks +20 lines, -59 lines 0 comments Download
A + third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.cpp View 1 2 3 4 16 chunks +71 lines, -297 lines 0 comments Download
A + third_party/WebKit/Source/bindings/core/v8/RemoteWindowProxy.h View 1 2 3 4 1 chunk +13 lines, -79 lines 0 comments Download
A + third_party/WebKit/Source/bindings/core/v8/RemoteWindowProxy.cpp View 1 2 3 4 2 chunks +94 lines, -82 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/ScriptController.h View 3 chunks +4 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp View 3 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/WindowProxy.h View 1 2 3 4 2 chunks +28 lines, -45 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp View 1 2 3 4 4 chunks +14 lines, -364 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/WindowProxyManager.h View 1 2 3 4 5 1 chunk +69 lines, -20 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/WindowProxyManager.cpp View 1 2 3 4 3 chunks +39 lines, -27 lines 0 comments Download
M third_party/WebKit/Source/core/frame/Frame.h View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/frame/LocalFrame.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/LocalFrame.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/RemoteFrame.h View 3 chunks +4 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/frame/RemoteFrame.cpp View 2 chunks +5 lines, -1 line 0 comments Download

Messages

Total messages: 31 (20 generated)
dcheng
https://codereview.chromium.org/2620313002/diff/100001/third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.cpp File third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.cpp (right): https://codereview.chromium.org/2620313002/diff/100001/third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.cpp#newcode135 third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.cpp:135: frame()->loader().dispatchDidClearWindowObjectInMainWorld(); Moved from initializeIfNeeded(), since this logic only applies ...
3 years, 11 months ago (2017-01-11 08:35:16 UTC) #10
Yuki
Is this CL missing LocalWindowProxyManager.{cpp,h}? Do you have RemoteWindowProxyManager, too?
3 years, 11 months ago (2017-01-11 09:05:23 UTC) #12
Yuki
On 2017/01/11 09:05:23, Yuki wrote: > Is this CL missing LocalWindowProxyManager.{cpp,h}? Do you have > ...
3 years, 11 months ago (2017-01-11 09:06:07 UTC) #13
Yuki
Mostly nits only. https://codereview.chromium.org/2620313002/diff/100001/third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.h File third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.h (right): https://codereview.chromium.org/2620313002/diff/100001/third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.h#newcode55 third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.h:55: ~LocalWindowProxy() override; nit: "= default" should ...
3 years, 11 months ago (2017-01-11 10:09:24 UTC) #14
dcheng
https://codereview.chromium.org/2620313002/diff/100001/third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.h File third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.h (right): https://codereview.chromium.org/2620313002/diff/100001/third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.h#newcode55 third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.h:55: ~LocalWindowProxy() override; On 2017/01/11 10:09:24, Yuki wrote: > nit: ...
3 years, 11 months ago (2017-01-11 10:35:29 UTC) #19
Yuki
LGTM.
3 years, 11 months ago (2017-01-11 11:20:09 UTC) #20
haraken
LGTM https://codereview.chromium.org/2620313002/diff/120001/third_party/WebKit/Source/bindings/core/v8/WindowProxyManager.h File third_party/WebKit/Source/bindings/core/v8/WindowProxyManager.h (right): https://codereview.chromium.org/2620313002/diff/120001/third_party/WebKit/Source/bindings/core/v8/WindowProxyManager.h#newcode56 third_party/WebKit/Source/bindings/core/v8/WindowProxyManager.h:56: class WindowProxyManagerImplHelper : public WindowProxyManagerBase { Why do ...
3 years, 11 months ago (2017-01-11 12:33:16 UTC) #21
haraken
On 2017/01/11 12:33:16, haraken wrote: > LGTM > > https://codereview.chromium.org/2620313002/diff/120001/third_party/WebKit/Source/bindings/core/v8/WindowProxyManager.h > File third_party/WebKit/Source/bindings/core/v8/WindowProxyManager.h (right): > ...
3 years, 11 months ago (2017-01-11 12:34:36 UTC) #22
dcheng
Thank you for the fast reviews! https://codereview.chromium.org/2620313002/diff/120001/third_party/WebKit/Source/bindings/core/v8/WindowProxyManager.h File third_party/WebKit/Source/bindings/core/v8/WindowProxyManager.h (right): https://codereview.chromium.org/2620313002/diff/120001/third_party/WebKit/Source/bindings/core/v8/WindowProxyManager.h#newcode56 third_party/WebKit/Source/bindings/core/v8/WindowProxyManager.h:56: class WindowProxyManagerImplHelper : ...
3 years, 11 months ago (2017-01-11 16:12:40 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/2620313002/140001
3 years, 11 months ago (2017-01-11 16:13:13 UTC) #28
commit-bot: I haz the power
3 years, 11 months ago (2017-01-11 17:48:22 UTC) #31
Message was sent while issue was closed.
Committed patchset #6 (id:140001) as
https://chromium.googlesource.com/chromium/src/+/690c3cf203b94623e5adbece7d6b...

Powered by Google App Engine
This is Rietveld 408576698