Index: src/elements.cc |
diff --git a/src/elements.cc b/src/elements.cc |
index ed88b01b8bf7baf764dd1d20aa6af0bfc10dceb0..d7e49cdcb9350b6f17c28882fc6c0aa6f57d12b4 100644 |
--- a/src/elements.cc |
+++ b/src/elements.cc |
@@ -450,11 +450,13 @@ |
WriteBarrierMode write_barrier_mode = UPDATE_WRITE_BARRIER) { |
struct { |
bool operator()(Object* a, Object* b) { |
- if (!a->IsUndefined()) { |
- if (b->IsUndefined()) return true; |
+ if (a->IsSmi() || !a->IsUndefined(HeapObject::cast(a)->GetIsolate())) { |
+ if (!b->IsSmi() && b->IsUndefined(HeapObject::cast(b)->GetIsolate())) { |
+ return true; |
+ } |
return a->Number() < b->Number(); |
} |
- return b->IsUndefined(); |
+ return !b->IsSmi() && b->IsUndefined(HeapObject::cast(b)->GetIsolate()); |
} |
} cmp; |
Object** start = |
@@ -1174,7 +1176,7 @@ |
uint32_t index = GetIndexForEntryImpl(*dict, entry); |
Handle<Object> result = SeededNumberDictionary::DeleteProperty(dict, entry); |
USE(result); |
- DCHECK(result->IsTrue()); |
+ DCHECK(result->IsTrue(dict->GetIsolate())); |
Handle<FixedArray> new_elements = |
SeededNumberDictionary::Shrink(dict, index); |
obj->set_elements(*new_elements); |
@@ -2445,7 +2447,7 @@ |
uint32_t index = GetIndexForEntryImpl(*dict, entry); |
Handle<Object> result = SeededNumberDictionary::DeleteProperty(dict, entry); |
USE(result); |
- DCHECK(result->IsTrue()); |
+ DCHECK(result->IsTrue(dict->GetIsolate())); |
Handle<FixedArray> new_elements = |
SeededNumberDictionary::Shrink(dict, index); |
parameter_map->set(1, *new_elements); |