BUG=chromium:485952
LOG=n
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/
1124223006
Cr-Commit-Position: refs/heads/master@{#28316}
: length_(length),
data_length_(SizeFor(length)),
data_(zone->NewArray<uintptr_t>(data_length_)) {
- DCHECK(length > 0);
+ DCHECK_LE(0, length);
Clear();
}
CopyFrom(other);
}
- static int SizeFor(int length) { return 1 + ((length - 1) / kDataBits); }
+ static int SizeFor(int length) {
+ if (length == 0) return 1;
+ return 1 + ((length - 1) / kDataBits);
+ }
void CopyFrom(const BitVector& other) {
DCHECK(other.length() <= length());