Chromium Code Reviews| Index: src/objects.cc |
| diff --git a/src/objects.cc b/src/objects.cc |
| index 47a61f627b817ca7d533aea305cfde7b90e4d110..efe7bffb4ac5e8c51dda97345ac7236b212ead99 100644 |
| --- a/src/objects.cc |
| +++ b/src/objects.cc |
| @@ -14787,6 +14787,15 @@ MaybeHandle<String> StringTable::LookupTwoCharsStringIfExists( |
| } |
| +void StringTable::EnsureCapacityForDeserialization(Isolate* isolate, int n) { |
|
mvstanton
2014/10/23 07:29:39
nit: how about size or length instead of n.
|
| + Handle<StringTable> table = isolate->factory()->string_table(); |
| + // We need a key instance for the virtual hash function. |
| + InternalizedStringKey dummy_key(Handle<String>::null()); |
| + table = StringTable::EnsureCapacity(table, n, &dummy_key); |
| + isolate->factory()->set_string_table(table); |
| +} |
| + |
| + |
| Handle<String> StringTable::LookupString(Isolate* isolate, |
| Handle<String> string) { |
| InternalizedStringKey key(string); |