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

Issue 332113002: VectorComparer should check null. (Closed)

Created:
6 years, 6 months ago by yoichio
Modified:
6 years, 6 months ago
Reviewers:
tkent, Yuta Kitamura
CC:
blink-reviews, blink-reviews-wtf_chromium.org, Mikhail, abarth-chromium
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

VectorComparer should check null. We use VectorComparer to compare WTF::Vector<T>. If T is not primitive type, we use std::equal to compare. By the way, we use the WTF::VectorBufferBase class for a base class of Vector. VectorBufferBase doesn't alloc a array if we init it without a size argument. As a conclusion, we pass NULL object to std::equal when we compare Vectors with the default constructor. It is asserted especially on a Windows debug build. BUG= Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=176189

Patch Set 1 #

Total comments: 4

Patch Set 2 : Add tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -1 line) Patch
M Source/wtf/Vector.h View 1 1 chunk +3 lines, -1 line 0 comments Download
M Source/wtf/VectorTest.cpp View 1 2 chunks +19 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
yoichio
6 years, 6 months ago (2014-06-16 04:23:08 UTC) #1
tkent
https://codereview.chromium.org/332113002/diff/1/Source/wtf/Vector.h File Source/wtf/Vector.h (right): https://codereview.chromium.org/332113002/diff/1/Source/wtf/Vector.h#newcode227 Source/wtf/Vector.h:227: if (!a || !b) { I recommend to write ...
6 years, 6 months ago (2014-06-16 04:42:26 UTC) #2
yoichio
https://codereview.chromium.org/332113002/diff/1/Source/wtf/Vector.h File Source/wtf/Vector.h (right): https://codereview.chromium.org/332113002/diff/1/Source/wtf/Vector.h#newcode227 Source/wtf/Vector.h:227: if (!a || !b) { On 2014/06/16 04:42:26, tkent ...
6 years, 6 months ago (2014-06-16 04:58:45 UTC) #3
tkent
lgtm
6 years, 6 months ago (2014-06-16 05:01:53 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yoichio@chromium.org/332113002/20001
6 years, 6 months ago (2014-06-16 05:02:14 UTC) #5
commit-bot: I haz the power
6 years, 6 months ago (2014-06-16 08:48:45 UTC) #6
Message was sent while issue was closed.
Change committed as 176189

Powered by Google App Engine
This is Rietveld 408576698