Index: src/lookup.cc |
diff --git a/src/lookup.cc b/src/lookup.cc |
index 3463322f33694bdf976e80e32fee351b52158dc6..83bfc79c8eefe6435b9134c33943e91f1d6bad83 100644 |
--- a/src/lookup.cc |
+++ b/src/lookup.cc |
@@ -38,7 +38,7 @@ LookupIterator LookupIterator::PropertyOrElement(Isolate* isolate, |
LookupIterator it(isolate, receiver, index, configuration); |
// Here we try to avoid having to rebuild the string later |
// by storing it on the indexed LookupIterator. |
- it.name_ = name; |
+ it.name_ = isolate->factory()->InternalizeName(name); |
return it; |
} |
@@ -239,7 +239,6 @@ void LookupIterator::PrepareTransitionToDataProperty( |
state_ = TRANSITION; |
if (map->IsJSGlobalObjectMap()) { |
// Install a property cell. |
- InternalizeName(); |
auto cell = JSGlobalObject::EnsurePropertyCell( |
Handle<JSGlobalObject>::cast(receiver), name()); |
DCHECK(cell->value()->IsTheHole()); |
@@ -534,12 +533,6 @@ void LookupIterator::WriteDataValue(Handle<Object> value) { |
} |
-void LookupIterator::InternalizeName() { |
- if (name_->IsUniqueName()) return; |
- name_ = factory()->InternalizeString(Handle<String>::cast(name_)); |
-} |
- |
- |
bool LookupIterator::HasInterceptor(Map* map) const { |
if (IsElement()) return map->has_indexed_interceptor(); |
return map->has_named_interceptor(); |