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

Unified Diff: src/objects-inl.h

Issue 2452007: Fix bug that could cause a string to be incorrectly tagged as an array index. (Closed)
Patch Set: Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/cctest/test-strings.cc » ('j') | test/cctest/test-strings.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index c10c930d31958cce7cc7953f63da4119636f69c1..fe33e7ef5110a8ac6aa57e086cc0e5cbb2c603a1 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -2986,7 +2986,8 @@ StringHasher::StringHasher(int length)
: length_(length),
raw_running_hash_(0),
array_index_(0),
- is_array_index_(0 < length_ && length_ <= String::kMaxArrayIndexSize),
+ is_array_index_(0 < length_ &&
+ length_ <= String::kMaxCachedArrayIndexLength),
is_first_char_(true),
is_valid_(true) { }
« no previous file with comments | « no previous file | test/cctest/test-strings.cc » ('j') | test/cctest/test-strings.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698