Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index fe33e7ef5110a8ac6aa57e086cc0e5cbb2c603a1..0dc5d00983c5982459e4de6ea5e93b972aec4d91 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -2986,8 +2986,7 @@ StringHasher::StringHasher(int length) |
: length_(length), |
raw_running_hash_(0), |
array_index_(0), |
- is_array_index_(0 < length_ && |
- length_ <= String::kMaxCachedArrayIndexLength), |
+ is_array_index_(0 < length_ && length_ <= String::kMaxArrayIndexSize), |
is_first_char_(true), |
is_valid_(true) { } |
@@ -3050,7 +3049,9 @@ uint32_t StringHasher::GetHash() { |
bool String::AsArrayIndex(uint32_t* index) { |
uint32_t field = hash_field(); |
- if (IsHashFieldComputed(field) && !(field & kIsArrayIndexMask)) return false; |
+ if (IsHashFieldComputed(field) && (field & kIsNotArrayIndexMask)) { |
+ return false; |
+ } |
return SlowAsArrayIndex(index); |
} |