Index: src/heap.cc |
diff --git a/src/heap.cc b/src/heap.cc |
index 2c5d9862f83cdd093afbaf8d6ea50029c7816ee6..afe0faaecaefb53a62dda969444f44468dcc737f 100644 |
--- a/src/heap.cc |
+++ b/src/heap.cc |
@@ -4675,15 +4675,6 @@ void Heap::Verify() { |
#endif |
-bool Heap::InternalizeStringIfExists(String* string, String** result) { |
- if (string->IsInternalizedString()) { |
- *result = string; |
- return true; |
- } |
- return string_table()->LookupStringIfExists(string, result); |
-} |
- |
- |
void Heap::ZapFromSpace() { |
NewSpacePageIterator it(new_space_.FromSpaceStart(), |
new_space_.FromSpaceEnd()); |
@@ -6262,12 +6253,11 @@ void KeyedLookupCache::Update(Handle<Map> map, |
Handle<Name> name, |
int field_offset) { |
if (!name->IsUniqueName()) { |
- String* internalized_string; |
- if (!map->GetIsolate()->heap()->InternalizeStringIfExists( |
- String::cast(*name), &internalized_string)) { |
+ if (!StringTable::InternalizeStringIfExists(name->GetIsolate(), |
+ Handle<String>::cast(name)). |
+ ToHandle(&name)) { |
return; |
} |
- name = handle(internalized_string); |
} |
// This cache is cleared only between mark compact passes, so we expect the |
// cache to only contain old space names. |