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

Issue 390983010: Fix Deque.swap for deques with inline capacity

Created:
6 years, 5 months ago by Erik Corry
Modified:
4 years, 9 months ago
CC:
blink-reviews, Mads Ager (chromium), abarth-chromium, haraken, blink-reviews-wtf_chromium.org, kouhei+heap_chromium.org, Mikhail
Project:
blink
Visibility:
Public.

Description

Fix Deque.swap for deques with inline capacity R=kbr@chromium.org, mikhail.pozdnyakov@gmail.com BUG=360572

Patch Set 1 #

Patch Set 2 : Remove unneeded CRTP #

Patch Set 3 : Fix comment #

Patch Set 4 : Make accidentally-public method private. #

Total comments: 6

Patch Set 5 : Fix test and bugs spotted by kbr #

Patch Set 6 : Add more tests of Vector and Deque swap #

Total comments: 2

Patch Set 7 : Use more fullnesses in test to improve coverage #

Total comments: 19

Patch Set 8 : Address comments from Ken and Mads, and simplify #

Total comments: 14
Unified diffs Side-by-side diffs Delta from patch set Stats (+575 lines, -182 lines) Patch
M Source/platform/heap/Heap.h View 1 chunk +1 line, -3 lines 0 comments Download
M Source/wtf/Deque.h View 1 2 3 4 5 6 23 chunks +81 lines, -70 lines 2 comments Download
M Source/wtf/DequeTest.cpp View 1 2 3 4 5 6 7 11 chunks +187 lines, -15 lines 0 comments Download
M Source/wtf/Vector.h View 1 2 3 4 5 6 7 33 chunks +204 lines, -94 lines 12 comments Download
M Source/wtf/VectorTest.cpp View 1 2 3 4 5 6 7 1 chunk +102 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
Erik Corry
PTAL Deque and Vector both use the VectorBuffer, but Vector uses a size field, where ...
6 years, 5 months ago (2014-07-15 12:24:04 UTC) #1
Ken Russell (switch to Gerrit)
This change is pretty involved. Are you confident that the existing tests (and the parameterization ...
6 years, 5 months ago (2014-07-16 07:38:42 UTC) #2
Erik Corry
https://codereview.chromium.org/390983010/diff/60001/Source/wtf/Deque.h File Source/wtf/Deque.h (right): https://codereview.chromium.org/390983010/diff/60001/Source/wtf/Deque.h#newcode287 Source/wtf/Deque.h:287: Range otherRange = (other.m_start != other.m_end && other.m_end == ...
6 years, 5 months ago (2014-07-17 12:40:04 UTC) #3
Erik Corry
https://codereview.chromium.org/390983010/diff/60001/Source/wtf/Vector.h File Source/wtf/Vector.h (right): https://codereview.chromium.org/390983010/diff/60001/Source/wtf/Vector.h#newcode493 Source/wtf/Vector.h:493: void swapVectorBuffer(VectorBuffer<T, inlineCapacity, Allocator>& other, Range thisRange, Range otherRange) ...
6 years, 5 months ago (2014-07-17 14:44:34 UTC) #4
Ken Russell (switch to Gerrit)
https://codereview.chromium.org/390983010/diff/100001/Source/wtf/DequeTest.cpp File Source/wtf/DequeTest.cpp (right): https://codereview.chromium.org/390983010/diff/100001/Source/wtf/DequeTest.cpp#newcode115 Source/wtf/DequeTest.cpp:115: Deque<int, inlineCapacity> intDeque2; Throughout this file and VectorTest.cpp, it ...
6 years, 5 months ago (2014-07-17 18:39:58 UTC) #5
Erik Corry
https://codereview.chromium.org/390983010/diff/100001/Source/wtf/DequeTest.cpp File Source/wtf/DequeTest.cpp (right): https://codereview.chromium.org/390983010/diff/100001/Source/wtf/DequeTest.cpp#newcode115 Source/wtf/DequeTest.cpp:115: Deque<int, inlineCapacity> intDeque2; On 2014/07/17 18:39:58, Ken Russell wrote: ...
6 years, 5 months ago (2014-07-18 07:16:09 UTC) #6
Erik Corry
I put a breakpoint in every 'if' statement body in swapVectorBuffer and verified that they ...
6 years, 5 months ago (2014-07-18 07:53:29 UTC) #7
Mads Ager (chromium)
Drive-by nits. https://codereview.chromium.org/390983010/diff/120001/Source/wtf/Deque.h File Source/wtf/Deque.h (right): https://codereview.chromium.org/390983010/diff/120001/Source/wtf/Deque.h#newcode49 Source/wtf/Deque.h:49: private: Remove this line. https://codereview.chromium.org/390983010/diff/120001/Source/wtf/Deque.h#newcode112 Source/wtf/Deque.h:112: friend ...
6 years, 5 months ago (2014-07-18 11:03:14 UTC) #8
Mads Ager (chromium)
Oh, and LGTM
6 years, 5 months ago (2014-07-18 11:04:01 UTC) #9
Ken Russell (switch to Gerrit)
I apologize for the delay re-reviewing this. Please see comments below. If you can find ...
6 years, 5 months ago (2014-07-21 20:44:09 UTC) #10
Erik Corry
https://codereview.chromium.org/390983010/diff/120001/Source/wtf/Deque.h File Source/wtf/Deque.h (right): https://codereview.chromium.org/390983010/diff/120001/Source/wtf/Deque.h#newcode112 Source/wtf/Deque.h:112: friend class VectorBuffer<T, inlineCapacity, Allocator>; On 2014/07/18 11:03:14, Mads ...
6 years, 5 months ago (2014-07-22 15:49:27 UTC) #11
Ken Russell (switch to Gerrit)
Thanks for making the test case names more descriptive. https://codereview.chromium.org/390983010/diff/140001/Source/wtf/Vector.h File Source/wtf/Vector.h (right): https://codereview.chromium.org/390983010/diff/140001/Source/wtf/Vector.h#newcode549 Source/wtf/Vector.h:549: ...
6 years, 5 months ago (2014-07-23 06:27:57 UTC) #12
Mikhail
I'm a bit worried that WTF::Vector/VectorBuffer is getting more and more complex, but I do ...
6 years, 5 months ago (2014-07-23 10:02:48 UTC) #13
Ken Russell (switch to Gerrit)
https://codereview.chromium.org/390983010/diff/140001/Source/wtf/Vector.h File Source/wtf/Vector.h (right): https://codereview.chromium.org/390983010/diff/140001/Source/wtf/Vector.h#newcode549 Source/wtf/Vector.h:549: while (thisRangePtr >= thisRanges || otherRangePtr >= otherRanges) { ...
6 years, 4 months ago (2014-07-29 00:15:33 UTC) #14
Mads Ager (chromium)
LGTM https://codereview.chromium.org/390983010/diff/140001/Source/wtf/Deque.h File Source/wtf/Deque.h (right): https://codereview.chromium.org/390983010/diff/140001/Source/wtf/Deque.h#newcode49 Source/wtf/Deque.h:49: private: Remove this duplicate private: line. https://codereview.chromium.org/390983010/diff/140001/Source/wtf/Vector.h File ...
6 years, 4 months ago (2014-08-04 10:17:12 UTC) #15
Ken Russell (switch to Gerrit)
LGTM then. Erik, sorry for the delay on this review. Thanks for persisting with it ...
6 years, 4 months ago (2014-08-04 18:22:12 UTC) #16
esprehn
Can we land this?
5 years, 4 months ago (2015-08-20 19:09:46 UTC) #17
Yuta Kitamura
4 years, 9 months ago (2016-03-23 04:40:24 UTC) #18
My work needs this bug to be fixed, so let me take over this patch.

Powered by Google App Engine
This is Rietveld 408576698