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

Issue 2084513002: Store raw pointers in ScriptWrappableVisitor markind deque (Closed)

Created:
4 years, 6 months ago by Marcel Hlopko
Modified:
4 years, 6 months ago
CC:
Mads Ager (chromium), blink-reviews, blink-reviews-bindings_chromium.org, chromium-reviews, haraken, kouhei+heap_chromium.org, oilpan-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Store raw pointers in ScriptWrappableVisitor markind deque With a few experiments making wrapper tracing incremental we realized we need to introduce write barriers anyway, and having script wrappables in the marking deque would make write barriers in non-script-wrappable classes complicated. This cl changes the marking deque to hold generic raw pointers + needed function pointers. We need one function to do the marking and adding members to the deque, and we need one function for getting the header, for correct invalidation of headers when oilpan gc runs during wrapper tracing. During invalidation, we also have to remove headers of deleted objects from m_headersToUnmark. We also had to revert to the previous implementation, where there is WrapperTypeInfo.traceWrappers instead of WraperTypeInfo.getHeapObjectHeader. Before we marked the object, and then added it to the marking deque for expansion. Now we add object to the marking deque, and marking and expansion is done in the one incremental step. LOG=no BUG=468240 Committed: https://crrev.com/8111a7789baafc20cd90808caf30fe5041a361ca Cr-Commit-Position: refs/heads/master@{#400722}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Fix comments #

Patch Set 3 : Do not push to deque if already marked #

Patch Set 4 : Remove obsolete code #

Total comments: 10

Patch Set 5 : Cleanup #

Unified diffs Side-by-side diffs Delta from patch set Stats (+310 lines, -247 lines) Patch
M third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.h View 1 2 3 4 3 chunks +73 lines, -22 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.cpp View 1 2 3 4 7 chunks +16 lines, -33 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/WrapperTypeInfo.h View 3 chunks +8 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/interface.h View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/interface.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/templates/interface_base.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8ArrayBuffer.h View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8ArrayBuffer.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8ArrayBufferView.h View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8ArrayBufferView.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8DataView.h View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8DataView.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8SVGTestInterface.h View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8SVGTestInterface.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestException.h View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestException.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexed.h View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexed.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedGlobal.h View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedGlobal.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedPrimaryGlobal.h View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedPrimaryGlobal.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.h View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.h View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface3.h View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface3.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCheckSecurity.h View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCheckSecurity.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor.h View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor2.h View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor2.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor3.h View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor3.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor4.h View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor4.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCustomConstructor.h View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCustomConstructor.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceDocument.h View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceDocument.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEmpty.h View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEmpty.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInitConstructor.h View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInitConstructor.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventTarget.h View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventTarget.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.h View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor.h View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor2.h View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor2.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNode.h View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNode.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceOriginTrialEnabled.h View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceOriginTrialEnabled.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestNode.h View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestNode.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.h View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperations.h View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperations.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperationsNotEnumerable.h View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperationsNotEnumerable.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestTypedefs.h View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestTypedefs.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8Uint8ClampedArray.h View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8Uint8ClampedArray.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.h View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/heap/GarbageCollected.h View 2 chunks +8 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/TraceTraits.h View 3 chunks +16 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/WrapperVisitor.h View 1 2 2 chunks +14 lines, -3 lines 0 comments Download

Messages

Total messages: 12 (4 generated)
Marcel Hlopko
Ptal.
4 years, 6 months ago (2016-06-20 10:51:18 UTC) #2
haraken
https://codereview.chromium.org/2084513002/diff/1/third_party/WebKit/Source/platform/heap/Heap.cpp File third_party/WebKit/Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/2084513002/diff/1/third_party/WebKit/Source/platform/heap/Heap.cpp#newcode575 third_party/WebKit/Source/platform/heap/Heap.cpp:575: state->invalidateDeadObjectsInWrappersMarkingDeque(); Why do you need this? Don't you already ...
4 years, 6 months ago (2016-06-20 11:10:38 UTC) #3
Marcel Hlopko
Incorporated comments. https://codereview.chromium.org/2084513002/diff/1/third_party/WebKit/Source/platform/heap/Heap.cpp File third_party/WebKit/Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/2084513002/diff/1/third_party/WebKit/Source/platform/heap/Heap.cpp#newcode575 third_party/WebKit/Source/platform/heap/Heap.cpp:575: state->invalidateDeadObjectsInWrappersMarkingDeque(); On 2016/06/20 at 11:10:38, haraken wrote: ...
4 years, 6 months ago (2016-06-20 11:29:13 UTC) #4
haraken
LGTM https://codereview.chromium.org/2084513002/diff/60001/third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.cpp File third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.cpp (right): https://codereview.chromium.org/2084513002/diff/60001/third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.cpp#newcode53 third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.cpp:53: m_headersToUnmark.clear(); Not related to this CL, don't we ...
4 years, 6 months ago (2016-06-20 14:20:57 UTC) #5
Marcel Hlopko
https://codereview.chromium.org/2084513002/diff/60001/third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.cpp File third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.cpp (right): https://codereview.chromium.org/2084513002/diff/60001/third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.cpp#newcode53 third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.cpp:53: m_headersToUnmark.clear(); On 2016/06/20 at 14:20:57, haraken wrote: > Not ...
4 years, 6 months ago (2016-06-20 16:26:46 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2084513002/80001
4 years, 6 months ago (2016-06-20 16:27:09 UTC) #9
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 6 months ago (2016-06-20 18:05:19 UTC) #10
commit-bot: I haz the power
4 years, 6 months ago (2016-06-20 18:10:46 UTC) #12
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/8111a7789baafc20cd90808caf30fe5041a361ca
Cr-Commit-Position: refs/heads/master@{#400722}

Powered by Google App Engine
This is Rietveld 408576698