Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index c91ed7c5fd366c24c544b2e4a70637a56e8eabfc..ea60976897832732061238bbf8624e7c52ea396f 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -4804,16 +4804,12 @@ void JSObject::MigrateSlowToFast(Handle<JSObject> object, |
int index = Smi::cast(iteration_order->get(i))->value(); |
Object* k = dictionary->KeyAt(index); |
DCHECK(dictionary->IsKey(k)); |
+ // Dictionary keys are internalized upon insertion. |
+ // TODO(jkummerow): Turn this into a DCHECK if it's not hit in the wild. |
+ CHECK(k->IsUniqueName()); |
+ Handle<Name> key(Name::cast(k), isolate); |
Object* value = dictionary->ValueAt(index); |
- Handle<Name> key; |
- if (k->IsSymbol()) { |
- key = handle(Symbol::cast(k)); |
- } else { |
- // Ensure the key is a unique name before writing into the |
- // instance descriptor. |
- key = factory->InternalizeString(handle(String::cast(k))); |
- } |
PropertyDetails details = dictionary->DetailsAt(index); |
int enumeration_index = details.dictionary_index(); |