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

Unified Diff: src/objects-inl.h

Issue 1637753004: [es7] refactor and fix Object.values() / Object.entries() (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix rebase Created 4 years, 10 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 | « src/objects.cc ('k') | test/mjsunit/harmony/object-entries.js » ('j') | no next file with comments »
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 e064ce60569bfc63bc33b7fd943271394a164080..475ca024175f75ea368cad7fcd0235e42e7a7fcc 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -2375,7 +2375,8 @@ void FixedArray::set(int index, Smi* value) {
void FixedArray::set(int index, Object* value) {
DCHECK_NE(GetHeap()->fixed_cow_array_map(), map());
DCHECK(IsFixedArray());
- DCHECK(index >= 0 && index < this->length());
+ DCHECK_GE(index, 0);
+ DCHECK_LT(index, this->length());
int offset = kHeaderSize + index * kPointerSize;
WRITE_FIELD(this, offset, value);
WRITE_BARRIER(GetHeap(), this, offset, value);
« no previous file with comments | « src/objects.cc ('k') | test/mjsunit/harmony/object-entries.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698