| Index: src/heap/heap.cc
|
| diff --git a/src/heap/heap.cc b/src/heap/heap.cc
|
| index eb7c7a8cd12525a5e97342b841eceb8f0d1e2551..4c492a1829074f82189380d26f583195028ab21e 100644
|
| --- a/src/heap/heap.cc
|
| +++ b/src/heap/heap.cc
|
| @@ -3059,9 +3059,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
|
| }
|
| @@ -3170,6 +3173,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::SetProperty(Handle<JSObject>::cast(private_intern_table), \
|
| + name_arg##d, symbol, STRICT).Assert(); \
|
| + }
|
| + 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:
|
|
|