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

Issue 2110183005: WTF::Vector: Fix primitive types identified as not safe to memcpy. (Closed)

Created:
4 years, 5 months ago by Yuta Kitamura
Modified:
4 years, 5 months ago
Reviewers:
tzik
CC:
chromium-reviews, blink-reviews, blink-reviews-wtf_chromium.org, Mikhail
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

WTF::Vector: Fix primitive types identified as not safe to memcpy. The culprit was the implementation of IsAssignable<> traits. Specifically, "std::declval<T>() = X" is invalid if T is a primitive type, because the assignment of primitives is not an overloaded operator and the compilability of this statement for a primitive T is different from that for a non-primitive T. The fix is to simply change the left-hand side of the assignment to "std::declval<T&>". BUG=624642 Committed: https://crrev.com/757e4b7379983a8760fe8f91e40bb3b34d64bde4 Cr-Commit-Position: refs/heads/master@{#403131}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Remove unneeded garbage; add a test for pointers. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -1 line) Patch
M third_party/WebKit/Source/wtf/TypeTraits.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/wtf/VectorTest.cpp View 1 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (7 generated)
Yuta Kitamura
tzik: PTAL?
4 years, 5 months ago (2016-06-30 08:02:29 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2110183005/1
4 years, 5 months ago (2016-06-30 08:04:03 UTC) #5
tzik
lgtm https://codereview.chromium.org/2110183005/diff/1/third_party/WebKit/Source/wtf/VectorTest.cpp File third_party/WebKit/Source/wtf/VectorTest.cpp (right): https://codereview.chromium.org/2110183005/diff/1/third_party/WebKit/Source/wtf/VectorTest.cpp#newcode696 third_party/WebKit/Source/wtf/VectorTest.cpp:696: static_assert(IsAssignable<int, const int&>::value, "aa"); Could you update "aa"?
4 years, 5 months ago (2016-06-30 08:06:02 UTC) #6
Yuta Kitamura
https://codereview.chromium.org/2110183005/diff/1/third_party/WebKit/Source/wtf/VectorTest.cpp File third_party/WebKit/Source/wtf/VectorTest.cpp (right): https://codereview.chromium.org/2110183005/diff/1/third_party/WebKit/Source/wtf/VectorTest.cpp#newcode696 third_party/WebKit/Source/wtf/VectorTest.cpp:696: static_assert(IsAssignable<int, const int&>::value, "aa"); On 2016/06/30 08:06:01, tzik wrote: ...
4 years, 5 months ago (2016-06-30 08:11:13 UTC) #7
Yuta Kitamura
https://codereview.chromium.org/2110183005/diff/1/third_party/WebKit/Source/wtf/VectorTest.cpp File third_party/WebKit/Source/wtf/VectorTest.cpp (right): https://codereview.chromium.org/2110183005/diff/1/third_party/WebKit/Source/wtf/VectorTest.cpp#newcode696 third_party/WebKit/Source/wtf/VectorTest.cpp:696: static_assert(IsAssignable<int, const int&>::value, "aa"); On 2016/06/30 08:06:01, tzik wrote: ...
4 years, 5 months ago (2016-06-30 08:11:13 UTC) #8
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/2110183005/20001
4 years, 5 months ago (2016-06-30 08:11:34 UTC) #11
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 5 months ago (2016-06-30 09:47:39 UTC) #13
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-06-30 09:47:48 UTC) #14
commit-bot: I haz the power
4 years, 5 months ago (2016-06-30 09:49:45 UTC) #16
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/757e4b7379983a8760fe8f91e40bb3b34d64bde4
Cr-Commit-Position: refs/heads/master@{#403131}

Powered by Google App Engine
This is Rietveld 408576698