Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index 09f4cc71278e39c57be57099f4c08aedcef34cbd..fc15a504edd6ec20353aa50ca4b25f016700d563 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -3060,9 +3060,12 @@ void Heap::CreateInitialObjects() { |
{ |
HandleScope scope(isolate()); |
-#define SYMBOL_INIT(name) \ |
- Handle<Symbol> name = factory->NewPrivateOwnSymbol(); \ |
- roots_[k##name##RootIndex] = *name; |
+#define SYMBOL_INIT(name) \ |
+ { \ |
+ Handle<String> name##d = factory->NewStringFromStaticChars(#name); \ |
+ Handle<Object> symbol(isolate()->factory()->NewPrivateOwnSymbol(name##d)); \ |
+ roots_[k##name##RootIndex] = *symbol; \ |
+ } |
PRIVATE_SYMBOL_LIST(SYMBOL_INIT) |
#undef SYMBOL_INIT |
} |
@@ -3171,6 +3174,19 @@ void Heap::CreateInitialObjects() { |
} |
+void Heap::AddPrivateGlobalSymbols(Handle<Object> private_intern_table) { |
+#define ADD_SYMBOL_TO_PRIVATE_INTERN_TABLE(name_arg) \ |
+ { \ |
+ Handle<Symbol> symbol(Symbol::cast(roots_[k##name_arg##RootIndex])); \ |
+ Handle<String> name_arg##d(String::cast(symbol->name())); \ |
+ JSObject::AddProperty(Handle<JSObject>::cast(private_intern_table), \ |
+ name_arg##d, symbol, NONE); \ |
+ } |
+ PRIVATE_SYMBOL_LIST(ADD_SYMBOL_TO_PRIVATE_INTERN_TABLE) |
+#undef ADD_SYMBOL_TO_PRIVATE_INTERN_TABLE |
+} |
+ |
+ |
bool Heap::RootCanBeWrittenAfterInitialization(Heap::RootListIndex root_index) { |
switch (root_index) { |
case kStoreBufferTopRootIndex: |