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

Issue 2474693002: [wrapper-tracing] Support for incrementally tracing ScopedPersistent (Closed)

Created:
4 years, 1 month ago by Michael Lippautz
Modified:
4 years, 1 month ago
Reviewers:
haraken, Marcel Hlopko
CC:
Mads Ager (chromium), blink-reviews, blink-reviews-bindings_chromium.org, chromium-reviews, haraken, kouhei+heap_chromium.org, oilpan-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[wrapper-tracing] Support for incrementally tracing ScopedPersistent This CL essentially adds the infrastructure to incrementally trace ScopedPersistent, including automatic write barriers. The type that should be used is TraceWrapperScopedPersistent. Once the dust settles, this type should no longer inherit from ScopedPersistent and contain a handle that is only weak when traced, i.e., follow regular tracing semantics. Drive-by-fixes: - Only implement tracing of Persistent<v8::Value> as we can cast to this type from any child. - Harden assertions about tracing types. BUG=chromium:468240 R=haraken@chromium.org,hlopko@chromium.org Committed: https://crrev.com/aa50c29e2487ffaaf8ab0ee98f1f84f0efc89016 Cr-Commit-Position: refs/heads/master@{#429617}

Patch Set 1 #

Total comments: 15

Patch Set 2 : Add EventTarget changes from previous CL #

Patch Set 3 : Add WBs to ctors #

Patch Set 4 : Removed some more dead code #

Patch Set 5 : Addressed comments #

Total comments: 4

Patch Set 6 : Addressed comments #

Patch Set 7 : Added tests #

Total comments: 18

Patch Set 8 : Resets bindings results #

Patch Set 9 : Addressed comments #

Patch Set 10 : Added bailout for tests when the flag is off #

Unified diffs Side-by-side diffs Delta from patch set Stats (+226 lines, -84 lines) Patch
M third_party/WebKit/Source/bindings/core/v8/ScopedPersistent.h View 1 2 3 4 5 6 7 8 4 chunks +39 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/ScriptWrappable.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.h View 1 2 3 4 5 6 7 8 5 chunks +9 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.cpp View 1 2 3 4 5 6 7 8 3 chunks +21 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitorTest.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +98 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitorVerifier.h View 1 2 3 4 5 6 7 8 1 chunk +13 lines, -15 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/templates/callback_function.cpp.tmpl View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/callback_function.h.tmpl View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/AnyCallbackFunctionOptionalAnyArg.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/AnyCallbackFunctionOptionalAnyArg.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/LongCallbackFunction.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/LongCallbackFunction.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/StringSequenceCallbackFunctionLongSequenceArg.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/StringSequenceCallbackFunctionLongSequenceArg.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunction.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunction.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionInterfaceArg.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionInterfaceArg.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionTypedef.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionTypedef.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/modules/VoidCallbackFunctionModules.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/modules/VoidCallbackFunctionModules.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/events/EventTarget.cpp View 1 2 chunks +3 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/core/events/PromiseRejectionEvent.h View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/events/PromiseRejectionEvent.cpp View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/WrapperVisitor.h View 1 2 3 4 5 6 7 8 3 chunks +7 lines, -6 lines 0 comments Download

Messages

Total messages: 21 (9 generated)
Michael Lippautz
PTAL: This is essentially a polished version of https://codereview.chromium.org/2458773008/ (TODO: run-bindings-tests --reset-results) https://codereview.chromium.org/2474693002/diff/1/third_party/WebKit/Source/bindings/core/v8/ScopedPersistent.h File third_party/WebKit/Source/bindings/core/v8/ScopedPersistent.h ...
4 years, 1 month ago (2016-11-02 16:00:03 UTC) #1
Marcel Hlopko
https://codereview.chromium.org/2474693002/diff/1/third_party/WebKit/Source/bindings/core/v8/ScopedPersistent.h File third_party/WebKit/Source/bindings/core/v8/ScopedPersistent.h (right): https://codereview.chromium.org/2474693002/diff/1/third_party/WebKit/Source/bindings/core/v8/ScopedPersistent.h#newcode125 third_party/WebKit/Source/bindings/core/v8/ScopedPersistent.h:125: class TraceWrapperScopedPersistent : public ScopedPersistent<T> { On 2016/11/02 at ...
4 years, 1 month ago (2016-11-02 16:44:51 UTC) #2
Michael Lippautz
https://codereview.chromium.org/2474693002/diff/1/third_party/WebKit/Source/bindings/core/v8/ScopedPersistent.h File third_party/WebKit/Source/bindings/core/v8/ScopedPersistent.h (right): https://codereview.chromium.org/2474693002/diff/1/third_party/WebKit/Source/bindings/core/v8/ScopedPersistent.h#newcode125 third_party/WebKit/Source/bindings/core/v8/ScopedPersistent.h:125: class TraceWrapperScopedPersistent : public ScopedPersistent<T> { On 2016/11/02 16:44:51, ...
4 years, 1 month ago (2016-11-02 17:07:56 UTC) #3
Marcel Hlopko
lgtm
4 years, 1 month ago (2016-11-02 17:14:39 UTC) #4
haraken
Can we add a test? https://codereview.chromium.org/2474693002/diff/1/third_party/WebKit/Source/bindings/core/v8/ScopedPersistent.h File third_party/WebKit/Source/bindings/core/v8/ScopedPersistent.h (right): https://codereview.chromium.org/2474693002/diff/1/third_party/WebKit/Source/bindings/core/v8/ScopedPersistent.h#newcode120 third_party/WebKit/Source/bindings/core/v8/ScopedPersistent.h:120: * appropriate handle type ...
4 years, 1 month ago (2016-11-03 05:55:25 UTC) #5
Michael Lippautz
Addressed comments. Working on tests now. https://codereview.chromium.org/2474693002/diff/1/third_party/WebKit/Source/bindings/core/v8/ScopedPersistent.h File third_party/WebKit/Source/bindings/core/v8/ScopedPersistent.h (right): https://codereview.chromium.org/2474693002/diff/1/third_party/WebKit/Source/bindings/core/v8/ScopedPersistent.h#newcode120 third_party/WebKit/Source/bindings/core/v8/ScopedPersistent.h:120: * appropriate handle ...
4 years, 1 month ago (2016-11-03 08:59:54 UTC) #6
Michael Lippautz
added tests, ptal
4 years, 1 month ago (2016-11-03 12:55:55 UTC) #7
haraken
LGTM https://codereview.chromium.org/2474693002/diff/120001/third_party/WebKit/Source/bindings/core/v8/ScopedPersistent.h File third_party/WebKit/Source/bindings/core/v8/ScopedPersistent.h (right): https://codereview.chromium.org/2474693002/diff/120001/third_party/WebKit/Source/bindings/core/v8/ScopedPersistent.h#newcode127 third_party/WebKit/Source/bindings/core/v8/ScopedPersistent.h:127: TraceWrapperV8Reference(void* parent) Add explicit. https://codereview.chromium.org/2474693002/diff/120001/third_party/WebKit/Source/bindings/core/v8/ScopedPersistent.h#newcode131 third_party/WebKit/Source/bindings/core/v8/ScopedPersistent.h:131: v8::Isolate* isolate, ...
4 years, 1 month ago (2016-11-03 14:25:04 UTC) #14
Michael Lippautz
Thanks for the detailed review! https://codereview.chromium.org/2474693002/diff/120001/third_party/WebKit/Source/bindings/core/v8/ScopedPersistent.h File third_party/WebKit/Source/bindings/core/v8/ScopedPersistent.h (right): https://codereview.chromium.org/2474693002/diff/120001/third_party/WebKit/Source/bindings/core/v8/ScopedPersistent.h#newcode127 third_party/WebKit/Source/bindings/core/v8/ScopedPersistent.h:127: TraceWrapperV8Reference(void* parent) On 2016/11/03 ...
4 years, 1 month ago (2016-11-03 14:53:41 UTC) #15
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/2474693002/180001
4 years, 1 month ago (2016-11-03 14:57:26 UTC) #18
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years, 1 month ago (2016-11-03 16:44:22 UTC) #19
commit-bot: I haz the power
4 years, 1 month ago (2016-11-03 17:13:00 UTC) #21
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/aa50c29e2487ffaaf8ab0ee98f1f84f0efc89016
Cr-Commit-Position: refs/heads/master@{#429617}

Powered by Google App Engine
This is Rietveld 408576698