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

Issue 2622363005: Migrate WTF::Vector::append() to ::push_back() in WTF::HexNumber (Closed)

Created:
3 years, 11 months ago by pilgrim_google
Modified:
3 years, 11 months ago
CC:
blink-reviews, blink-reviews-wtf_chromium.org, chromium-reviews, Mikhail
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Migrate WTF::Vector::append() to ::push_back() in WTF::HexNumber As discussed on platform-architecture-dev [0], there is interest in normalizing the methods of WTF classes to better align with std classes. This CL uses template specialization on WTF::HexNumber::appendByteAsHex, which needs to support classes (like WTF::Vector) that are being migrated to push_back() while other classes (like WTF::StringBuilder) are still using an append() method. There are no functional changes. [0] https://groups.google.com/a/chromium.org/d/topic/platform-architecture-dev/I7jnz4p1h84/discussion BUG=662431 Review-Url: https://codereview.chromium.org/2622363005 Cr-Commit-Position: refs/heads/master@{#446345} Committed: https://chromium.googlesource.com/chromium/src/+/cb3a30a6acb4e3e774f9c0d416bb90c270065364

Patch Set 1 #

Patch Set 2 : different syntax, still doesn't compile #

Patch Set 3 : jsbell's variation #

Total comments: 1

Patch Set 4 : compiles, ship to production #

Total comments: 1

Patch Set 5 : switch HexNumber::appendUnsignedAsHexFixedSize to static function for less partial template special… #

Total comments: 3

Patch Set 6 : be as specific as possible in Vector override methods in HexNumber #

Total comments: 1

Patch Set 7 : remove template, rely on function overload resolution for Vector-specific methods #

Unified diffs Side-by-side diffs Delta from patch set Stats (+74 lines, -59 lines) Patch
M third_party/WebKit/Source/core/css/CSSMarkup.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTreeAsText.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothUUID.cpp View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/Color.cpp View 1 2 3 4 5 6 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/LoggingCanvas.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/network/FormDataEncoder.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/wtf/HexNumber.h View 1 2 3 4 5 6 1 chunk +63 lines, -49 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/WTFString.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 52 (29 generated)
pilgrim_google
This does not currently compile. The idea is sound but I can't get the syntax ...
3 years, 11 months ago (2017-01-12 17:04:41 UTC) #4
jsbell
https://codereview.chromium.org/2622363005/diff/40001/third_party/WebKit/Source/wtf/HexNumber.h File third_party/WebKit/Source/wtf/HexNumber.h (right): https://codereview.chromium.org/2622363005/diff/40001/third_party/WebKit/Source/wtf/HexNumber.h#newcode51 third_party/WebKit/Source/wtf/HexNumber.h:51: HexConversionMode mode = Uppercase) { This should be just ...
3 years, 11 months ago (2017-01-12 23:35:26 UTC) #15
jsbell
3 years, 11 months ago (2017-01-12 23:35:27 UTC) #16
pilgrim_google
OK, this is ready for review.
3 years, 11 months ago (2017-01-13 02:45:46 UTC) #21
haraken
LGTM
3 years, 11 months ago (2017-01-13 02:49:42 UTC) #22
Yuta Kitamura
I just have an optional suggestion; your patch LGTM as-is. https://codereview.chromium.org/2622363005/diff/60001/third_party/WebKit/Source/wtf/HexNumber.h File third_party/WebKit/Source/wtf/HexNumber.h (right): https://codereview.chromium.org/2622363005/diff/60001/third_party/WebKit/Source/wtf/HexNumber.h#newcode49 ...
3 years, 11 months ago (2017-01-13 07:32:09 UTC) #23
esprehn
I'd prefer we made this generic on Vector<T> instead of LChar.
3 years, 11 months ago (2017-01-13 07:43:07 UTC) #24
jsbell
On 2017/01/13 07:43:07, esprehn wrote: > I'd prefer we made this generic on Vector<T> instead ...
3 years, 11 months ago (2017-01-13 17:13:44 UTC) #25
esprehn
On 2017/01/13 at 17:13:44, jsbell wrote: > On 2017/01/13 07:43:07, esprehn wrote: > > I'd ...
3 years, 11 months ago (2017-01-13 17:26:44 UTC) #26
jsbell
On 2017/01/13 17:26:44, esprehn wrote: > On 2017/01/13 at 17:13:44, jsbell wrote: > > On ...
3 years, 11 months ago (2017-01-13 18:01:13 UTC) #27
esprehn
On 2017/01/13 at 18:01:13, jsbell wrote: > On 2017/01/13 17:26:44, esprehn wrote: > > On ...
3 years, 11 months ago (2017-01-13 22:17:00 UTC) #28
pilgrim_google
please re-review
3 years, 11 months ago (2017-01-19 17:43:21 UTC) #31
jsbell
https://codereview.chromium.org/2622363005/diff/80001/third_party/WebKit/Source/wtf/HexNumber.h File third_party/WebKit/Source/wtf/HexNumber.h (right): https://codereview.chromium.org/2622363005/diff/80001/third_party/WebKit/Source/wtf/HexNumber.h#newcode51 third_party/WebKit/Source/wtf/HexNumber.h:51: Vector<T>& destination, Partial specialization of functions is forbidden, but ...
3 years, 11 months ago (2017-01-19 17:52:30 UTC) #32
Yuta Kitamura
https://codereview.chromium.org/2622363005/diff/80001/third_party/WebKit/Source/wtf/HexNumber.h File third_party/WebKit/Source/wtf/HexNumber.h (right): https://codereview.chromium.org/2622363005/diff/80001/third_party/WebKit/Source/wtf/HexNumber.h#newcode51 third_party/WebKit/Source/wtf/HexNumber.h:51: Vector<T>& destination, On 2017/01/19 17:52:30, jsbell wrote: > Partial ...
3 years, 11 months ago (2017-01-20 04:46:33 UTC) #35
esprehn
On 2017/01/20 at 04:46:33, yutak wrote: > https://codereview.chromium.org/2622363005/diff/80001/third_party/WebKit/Source/wtf/HexNumber.h > File third_party/WebKit/Source/wtf/HexNumber.h (right): > > https://codereview.chromium.org/2622363005/diff/80001/third_party/WebKit/Source/wtf/HexNumber.h#newcode51 ...
3 years, 11 months ago (2017-01-20 04:52:57 UTC) #36
jsbell
On 2017/01/20 04:52:57, esprehn wrote: > Can we be explicit and have Vector<UChar>, Vector<LChar>, etc. ...
3 years, 11 months ago (2017-01-20 17:43:10 UTC) #37
pilgrim_google
Please re-review.
3 years, 11 months ago (2017-01-24 16:27:55 UTC) #38
Yuta Kitamura
https://codereview.chromium.org/2622363005/diff/100001/third_party/WebKit/Source/wtf/HexNumber.h File third_party/WebKit/Source/wtf/HexNumber.h (right): https://codereview.chromium.org/2622363005/diff/100001/third_party/WebKit/Source/wtf/HexNumber.h#newcode49 third_party/WebKit/Source/wtf/HexNumber.h:49: template static inline void appendByteAsHex( If you intend to ...
3 years, 11 months ago (2017-01-25 05:33:28 UTC) #43
Yuta Kitamura
LGTM except for the comment above.
3 years, 11 months ago (2017-01-25 06:02:52 UTC) #44
pilgrim_google
On 2017/01/25 at 05:33:28, yutak wrote: > https://codereview.chromium.org/2622363005/diff/100001/third_party/WebKit/Source/wtf/HexNumber.h > File third_party/WebKit/Source/wtf/HexNumber.h (right): > > https://codereview.chromium.org/2622363005/diff/100001/third_party/WebKit/Source/wtf/HexNumber.h#newcode49 ...
3 years, 11 months ago (2017-01-25 15:05:15 UTC) #45
Yuta Kitamura
On 2017/01/25 15:05:15, pilgrim_google wrote: > On 2017/01/25 at 05:33:28, yutak wrote: > > > ...
3 years, 11 months ago (2017-01-26 04:58:24 UTC) #46
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/2622363005/120001
3 years, 11 months ago (2017-01-26 15:02:24 UTC) #49
commit-bot: I haz the power
3 years, 11 months ago (2017-01-26 16:27:04 UTC) #52
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/cb3a30a6acb4e3e774f9c0d416bb...

Powered by Google App Engine
This is Rietveld 408576698