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

Issue 1088973006: Oilpan: Correct static_asserts about VectorTraits::canInitializeWithMemset (Closed)

Created:
5 years, 8 months ago by haraken
Modified:
5 years, 8 months ago
Reviewers:
oilpan-reviews, tkent, sof
CC:
blink-reviews, ed+blinkwatch_opera.com, shans, rjwright, oilpan-reviews, Mads Ager (chromium), Mike Lawther (Google), blink-reviews-animation_chromium.org, blink-reviews-css, rwlbuis, dglazkov+blink, dstockwell, Timothy Loh, apavlov+blink_chromium.org, darktears, Steve Block, kouhei+heap_chromium.org, Eric Willigers
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Oilpan: Correct static_asserts about VectorTraits::canInitializeWithMemset HeapVectorBacking::trace and HeapVectorBacking::finalize do not support items that cannot be initialized with memset. This CL adds static_asserts about the condition. This CL also makes the following change: - Remove a static_assert about 'sizeof(T) > allocationGranularity', since the assert doesn't make sense. Even if sizeof(T) is smaller than the allocationGranurarity (i.e., 8 byte), HeapVectorBacking::trace/finalize should work correctly as long as the object can be initialized with memset. - Remove static_asserts from Vector.h, since the static_asserts in Heap.h are enough. - Add a WTF_INIT_WITH_MEM_FUNCTIONS macro to RuleFeature and UpdatedAnimationStyle. The macros were just missing. BUG=475801 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=194480

Patch Set 1 #

Total comments: 1

Patch Set 2 : #

Total comments: 1

Patch Set 3 : #

Total comments: 1

Patch Set 4 : #

Patch Set 5 : #

Total comments: 6

Patch Set 6 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -26 lines) Patch
M Source/core/animation/css/CSSAnimationUpdate.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/css/RuleFeature.h View 1 chunk +2 lines, -1 line 0 comments Download
M Source/platform/heap/Heap.h View 1 2 3 4 3 chunks +21 lines, -12 lines 2 comments Download
M Source/wtf/Vector.h View 1 2 3 4 5 4 chunks +6 lines, -13 lines 0 comments Download

Messages

Total messages: 30 (4 generated)
haraken
This CL doesn't yet compile since there remain a bunch of vectors that don't have ...
5 years, 8 months ago (2015-04-22 16:10:33 UTC) #2
haraken
https://codereview.chromium.org/1088973006/diff/1/Source/platform/heap/Heap.h File Source/platform/heap/Heap.h (left): https://codereview.chromium.org/1088973006/diff/1/Source/platform/heap/Heap.h#oldcode1930 Source/platform/heap/Heap.h:1930: static_assert(!ShouldBeTraced<Traits>::value || sizeof(T) > blink::allocationGranularity || Traits::canInitializeWithMemset, "heap overallocation ...
5 years, 8 months ago (2015-04-22 16:13:22 UTC) #3
haraken
The patch set 2 compiles but is wrong. https://codereview.chromium.org/1088973006/diff/20001/Source/core/html/canvas/WebGLVertexArrayObjectOES.h File Source/core/html/canvas/WebGLVertexArrayObjectOES.h (right): https://codereview.chromium.org/1088973006/diff/20001/Source/core/html/canvas/WebGLVertexArrayObjectOES.h#newcode116 Source/core/html/canvas/WebGLVertexArrayObjectOES.h:116: WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::WebGLVertexArrayObjectOES::VertexAttribState); ...
5 years, 8 months ago (2015-04-22 16:16:48 UTC) #4
haraken
PTAL See the CL description for the rationale of this change.
5 years, 8 months ago (2015-04-23 08:42:38 UTC) #5
sof
On 2015/04/23 08:42:38, haraken wrote: > PTAL > > See the CL description for the ...
5 years, 8 months ago (2015-04-23 08:46:00 UTC) #6
haraken
On 2015/04/23 08:46:00, sof wrote: > On 2015/04/23 08:42:38, haraken wrote: > > PTAL > ...
5 years, 8 months ago (2015-04-23 08:55:48 UTC) #7
sof
On 2015/04/23 08:55:48, haraken wrote: > On 2015/04/23 08:46:00, sof wrote: > > On 2015/04/23 ...
5 years, 8 months ago (2015-04-23 08:59:18 UTC) #8
haraken
On 2015/04/23 08:59:18, sof wrote: > On 2015/04/23 08:55:48, haraken wrote: > > On 2015/04/23 ...
5 years, 8 months ago (2015-04-23 10:27:49 UTC) #9
sof
On 2015/04/23 10:27:49, haraken wrote: > On 2015/04/23 08:59:18, sof wrote: > > On 2015/04/23 ...
5 years, 8 months ago (2015-04-23 11:29:56 UTC) #10
haraken
> What goes wrong on trunk for VertexAttribState & its current vector traits? HeapVectorBacking doesn't ...
5 years, 8 months ago (2015-04-23 11:52:57 UTC) #11
sof
On 2015/04/23 11:52:57, haraken wrote: > > What goes wrong on trunk for VertexAttribState & ...
5 years, 8 months ago (2015-04-24 12:25:36 UTC) #12
sof
(needs a rebase for VertexAttribState, ofc.) https://codereview.chromium.org/1088973006/diff/40001/Source/platform/heap/Heap.h File Source/platform/heap/Heap.h (right): https://codereview.chromium.org/1088973006/diff/40001/Source/platform/heap/Heap.h#newcode2216 Source/platform/heap/Heap.h:2216: static_assert(Traits::needsDestruction, "HeapVectors that ...
5 years, 8 months ago (2015-04-24 12:26:10 UTC) #13
haraken
Thanks for review! > https://codereview.chromium.org/1088973006/diff/40001/Source/platform/heap/Heap.h > File Source/platform/heap/Heap.h (right): > > https://codereview.chromium.org/1088973006/diff/40001/Source/platform/heap/Heap.h#newcode2216 > Source/platform/heap/Heap.h:2216: static_assert(Traits::needsDestruction, ...
5 years, 8 months ago (2015-04-24 12:34:16 UTC) #14
haraken
On 2015/04/24 12:34:16, haraken wrote: > Thanks for review! > > > > https://codereview.chromium.org/1088973006/diff/40001/Source/platform/heap/Heap.h > ...
5 years, 8 months ago (2015-04-24 12:35:20 UTC) #15
haraken
tkent-san: Mind taking a look at wtf/?
5 years, 8 months ago (2015-04-24 12:36:18 UTC) #17
sof
https://codereview.chromium.org/1088973006/diff/80001/Source/wtf/Vector.h File Source/wtf/Vector.h (left): https://codereview.chromium.org/1088973006/diff/80001/Source/wtf/Vector.h#oldcode643 Source/wtf/Vector.h:643: static_assert(!WTF::IsPolymorphic<T>::value || !VectorTraits<T>::canInitializeWithMemset, "cannot initialize with memset if there ...
5 years, 8 months ago (2015-04-24 12:40:06 UTC) #18
haraken
https://codereview.chromium.org/1088973006/diff/80001/Source/wtf/Vector.h File Source/wtf/Vector.h (left): https://codereview.chromium.org/1088973006/diff/80001/Source/wtf/Vector.h#oldcode643 Source/wtf/Vector.h:643: static_assert(!WTF::IsPolymorphic<T>::value || !VectorTraits<T>::canInitializeWithMemset, "cannot initialize with memset if there ...
5 years, 8 months ago (2015-04-24 12:45:37 UTC) #19
sof
https://codereview.chromium.org/1088973006/diff/80001/Source/wtf/Vector.h File Source/wtf/Vector.h (left): https://codereview.chromium.org/1088973006/diff/80001/Source/wtf/Vector.h#oldcode643 Source/wtf/Vector.h:643: static_assert(!WTF::IsPolymorphic<T>::value || !VectorTraits<T>::canInitializeWithMemset, "cannot initialize with memset if there ...
5 years, 8 months ago (2015-04-24 12:50:39 UTC) #20
haraken
https://codereview.chromium.org/1088973006/diff/80001/Source/wtf/Vector.h File Source/wtf/Vector.h (left): https://codereview.chromium.org/1088973006/diff/80001/Source/wtf/Vector.h#oldcode643 Source/wtf/Vector.h:643: static_assert(!WTF::IsPolymorphic<T>::value || !VectorTraits<T>::canInitializeWithMemset, "cannot initialize with memset if there ...
5 years, 8 months ago (2015-04-24 13:02:26 UTC) #21
sof
https://codereview.chromium.org/1088973006/diff/80001/Source/wtf/Vector.h File Source/wtf/Vector.h (left): https://codereview.chromium.org/1088973006/diff/80001/Source/wtf/Vector.h#oldcode643 Source/wtf/Vector.h:643: static_assert(!WTF::IsPolymorphic<T>::value || !VectorTraits<T>::canInitializeWithMemset, "cannot initialize with memset if there ...
5 years, 8 months ago (2015-04-24 13:11:08 UTC) #22
haraken
https://codereview.chromium.org/1088973006/diff/80001/Source/wtf/Vector.h File Source/wtf/Vector.h (left): https://codereview.chromium.org/1088973006/diff/80001/Source/wtf/Vector.h#oldcode643 Source/wtf/Vector.h:643: static_assert(!WTF::IsPolymorphic<T>::value || !VectorTraits<T>::canInitializeWithMemset, "cannot initialize with memset if there ...
5 years, 8 months ago (2015-04-24 13:13:48 UTC) #23
haraken
tkent-san: Mind taking a look at wtf/?
5 years, 8 months ago (2015-04-27 03:14:59 UTC) #24
tkent
lgtm https://codereview.chromium.org/1088973006/diff/100001/Source/platform/heap/Heap.h File Source/platform/heap/Heap.h (right): https://codereview.chromium.org/1088973006/diff/100001/Source/platform/heap/Heap.h#newcode1899 Source/platform/heap/Heap.h:1899: // (this is done by VectorUnusedSlotClearer) and T ...
5 years, 8 months ago (2015-04-27 03:29:23 UTC) #25
haraken
https://codereview.chromium.org/1088973006/diff/100001/Source/platform/heap/Heap.h File Source/platform/heap/Heap.h (right): https://codereview.chromium.org/1088973006/diff/100001/Source/platform/heap/Heap.h#newcode1899 Source/platform/heap/Heap.h:1899: // (this is done by VectorUnusedSlotClearer) and T can ...
5 years, 8 months ago (2015-04-27 03:54:41 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1088973006/100001
5 years, 8 months ago (2015-04-27 03:54:56 UTC) #29
commit-bot: I haz the power
5 years, 8 months ago (2015-04-27 05:11:32 UTC) #30
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=194480

Powered by Google App Engine
This is Rietveld 408576698