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

Issue 2617733004: binding: Changes the association among global-proxy/global/window-instance. (Closed)

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

Description

binding: Changes the association among global-proxy/global/window-instance. Since V8 now supports internal fields for the global proxy objects, let's change the mappings among global proxy object / global object / C++ instance in Blink. With this CL, a global proxy object and C++ instance point to each other, and a global object points to the C++ instance (without reverse pointer). Note that this CL makes one big difference. For non-window objects, Blink objects always live longer than V8 wrappers. This CL introduces an exception; DOMWindow may be collected before the V8 wrapper object gets collected because the V8 wrapper is the global proxy object which remains the same while navigations. BUG=675872 Review-Url: https://codereview.chromium.org/2617733004 Cr-Commit-Position: refs/heads/master@{#449616} Committed: https://chromium.googlesource.com/chromium/src/+/76ec9e6ea20fb4a3c1f242e39abea0067afd235a

Patch Set 1 #

Patch Set 2 : Synced. #

Patch Set 3 : Fixed DOMWindow::wrap. #

Patch Set 4 : Synced. #

Patch Set 5 : Synced. #

Patch Set 6 : Synced. #

Patch Set 7 : Synced. #

Patch Set 8 : Fixed a build breakage. #

Patch Set 9 : Dissociates wrappers when a DOMWindow gets gone. #

Patch Set 10 : Fixed a compile error. #

Patch Set 11 : Fixed another compile error. #

Patch Set 12 : Fixed Document.defaultView #

Total comments: 17

Patch Set 13 : Synced. #

Patch Set 14 : Addressed review comments. #

Total comments: 3

Patch Set 15 : Addressed review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+123 lines, -172 lines) Patch
M third_party/WebKit/LayoutTests/fast/dom/defaultView-on-detached-document.html View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/defaultView-on-detached-document-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/bindings.gni View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/DOMDataStore.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +10 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/DOMWrapperMap.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +24 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +15 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/ScriptWrappable.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/ToV8.h View 1 2 3 4 5 6 7 8 2 chunks +0 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/ToV8.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -43 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8Binding.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +0 lines, -74 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8DOMWrapper.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +5 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp View 1 2 3 4 5 6 7 8 3 chunks +18 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/WrapperTypeInfo.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.idl View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/DOMWindow.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +20 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 86 (70 generated)
Yuki
Could you review this CL?
3 years, 10 months ago (2017-02-01 08:27:42 UTC) #53
haraken
https://codereview.chromium.org/2617733004/diff/210001/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.h File third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.h (right): https://codereview.chromium.org/2617733004/diff/210001/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.h#newcode138 third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.h:138: // wrapper because the wrapper object associated with a ...
3 years, 10 months ago (2017-02-01 08:40:44 UTC) #54
Yuki
https://codereview.chromium.org/2617733004/diff/210001/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.h File third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.h (right): https://codereview.chromium.org/2617733004/diff/210001/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.h#newcode138 third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.h:138: // wrapper because the wrapper object associated with a ...
3 years, 10 months ago (2017-02-01 08:47:59 UTC) #55
haraken
On 2017/02/01 08:47:59, Yuki wrote: > https://codereview.chromium.org/2617733004/diff/210001/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.h > File third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.h (right): > > https://codereview.chromium.org/2617733004/diff/210001/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.h#newcode138 > ...
3 years, 10 months ago (2017-02-01 08:53:42 UTC) #56
Yuki
On 2017/02/01 08:53:42, haraken wrote: > On 2017/02/01 08:47:59, Yuki wrote: > > > https://codereview.chromium.org/2617733004/diff/210001/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.h ...
3 years, 10 months ago (2017-02-01 12:36:16 UTC) #59
haraken
(Maybe it's easier to chat offline -- not because I think your analysis is wrong ...
3 years, 10 months ago (2017-02-02 09:09:02 UTC) #60
Yuki
On 2017/02/02 09:09:02, haraken wrote: > (Maybe it's easier to chat offline -- not because ...
3 years, 10 months ago (2017-02-02 09:19:42 UTC) #61
haraken
LGTM with comments. https://codereview.chromium.org/2617733004/diff/210001/third_party/WebKit/Source/bindings/core/v8/DOMDataStore.h File third_party/WebKit/Source/bindings/core/v8/DOMDataStore.h (right): https://codereview.chromium.org/2617733004/diff/210001/third_party/WebKit/Source/bindings/core/v8/DOMDataStore.h#newcode186 third_party/WebKit/Source/bindings/core/v8/DOMDataStore.h:186: // Dissociates a wrapper, if any, ...
3 years, 10 months ago (2017-02-09 12:46:40 UTC) #62
Yuki
Could you take another look? https://codereview.chromium.org/2617733004/diff/210001/third_party/WebKit/Source/bindings/core/v8/DOMDataStore.h File third_party/WebKit/Source/bindings/core/v8/DOMDataStore.h (right): https://codereview.chromium.org/2617733004/diff/210001/third_party/WebKit/Source/bindings/core/v8/DOMDataStore.h#newcode186 third_party/WebKit/Source/bindings/core/v8/DOMDataStore.h:186: // Dissociates a wrapper, ...
3 years, 10 months ago (2017-02-10 07:47:21 UTC) #69
haraken
LGTM https://codereview.chromium.org/2617733004/diff/210001/third_party/WebKit/Source/core/dom/Document.cpp File third_party/WebKit/Source/core/dom/Document.cpp (right): https://codereview.chromium.org/2617733004/diff/210001/third_party/WebKit/Source/core/dom/Document.cpp#newcode5212 third_party/WebKit/Source/core/dom/Document.cpp:5212: return m_frame ? m_domWindow : nullptr; On 2017/02/10 ...
3 years, 10 months ago (2017-02-10 07:59:40 UTC) #70
Yuki
https://codereview.chromium.org/2617733004/diff/210001/third_party/WebKit/Source/core/dom/Document.cpp File third_party/WebKit/Source/core/dom/Document.cpp (right): https://codereview.chromium.org/2617733004/diff/210001/third_party/WebKit/Source/core/dom/Document.cpp#newcode5212 third_party/WebKit/Source/core/dom/Document.cpp:5212: return m_frame ? m_domWindow : nullptr; On 2017/02/10 07:59:40, ...
3 years, 10 months ago (2017-02-10 08:18:19 UTC) #71
haraken
https://codereview.chromium.org/2617733004/diff/210001/third_party/WebKit/Source/core/dom/Document.cpp File third_party/WebKit/Source/core/dom/Document.cpp (right): https://codereview.chromium.org/2617733004/diff/210001/third_party/WebKit/Source/core/dom/Document.cpp#newcode5212 third_party/WebKit/Source/core/dom/Document.cpp:5212: return m_frame ? m_domWindow : nullptr; On 2017/02/10 08:18:19, ...
3 years, 10 months ago (2017-02-10 09:15:31 UTC) #72
Yuki
https://codereview.chromium.org/2617733004/diff/210001/third_party/WebKit/Source/core/dom/Document.cpp File third_party/WebKit/Source/core/dom/Document.cpp (right): https://codereview.chromium.org/2617733004/diff/210001/third_party/WebKit/Source/core/dom/Document.cpp#newcode5212 third_party/WebKit/Source/core/dom/Document.cpp:5212: return m_frame ? m_domWindow : nullptr; On 2017/02/10 09:15:31, ...
3 years, 10 months ago (2017-02-10 11:22:47 UTC) #77
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/2617733004/270001
3 years, 10 months ago (2017-02-10 13:08:03 UTC) #81
commit-bot: I haz the power
Committed patchset #15 (id:270001) as https://chromium.googlesource.com/chromium/src/+/76ec9e6ea20fb4a3c1f242e39abea0067afd235a
3 years, 10 months ago (2017-02-10 14:36:58 UTC) #84
Yuki
3 years, 10 months ago (2017-02-13 06:53:09 UTC) #85
Message was sent while issue was closed.
A revert of this CL (patchset #15 id:270001) has been created in
https://codereview.chromium.org/2690943002/ by yukishiino@chromium.org.

The reason for reverting is: This CL is suspicious to be causing crashes:
https://crbug.com/691269
.

Powered by Google App Engine
This is Rietveld 408576698