Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index 847269e829865fb54c6dfe7a0753663708cc8509..ad3bfef559452199064da7813739e217e8b2f568 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -2736,12 +2736,12 @@ |
{ |
HandleScope scope(isolate()); |
-#define SYMBOL_INIT(name) \ |
- { \ |
- Handle<String> name##d = factory->NewStringFromStaticChars(#name); \ |
- Handle<Symbol> name = \ |
- isolate()->factory()->NewPrivateSymbol(name##d).ToHandleChecked(); \ |
- roots_[k##name##RootIndex] = *name; \ |
+#define SYMBOL_INIT(name) \ |
+ { \ |
+ Handle<String> name##d = factory->NewStringFromStaticChars(#name); \ |
+ Handle<Symbol> symbol(isolate()->factory()->NewPrivateSymbol()); \ |
+ symbol->set_name(*name##d); \ |
+ roots_[k##name##RootIndex] = *symbol; \ |
} |
PRIVATE_SYMBOL_LIST(SYMBOL_INIT) |
#undef SYMBOL_INIT |
@@ -2750,16 +2750,18 @@ |
{ |
HandleScope scope(isolate()); |
#define SYMBOL_INIT(name, description) \ |
+ Handle<Symbol> name = factory->NewSymbol(); \ |
Handle<String> name##d = factory->NewStringFromStaticChars(#description); \ |
- Handle<Symbol> name = factory->NewSymbol(name##d).ToHandleChecked(); \ |
+ name->set_name(*name##d); \ |
roots_[k##name##RootIndex] = *name; |
PUBLIC_SYMBOL_LIST(SYMBOL_INIT) |
#undef SYMBOL_INIT |
#define SYMBOL_INIT(name, description) \ |
+ Handle<Symbol> name = factory->NewSymbol(); \ |
Handle<String> name##d = factory->NewStringFromStaticChars(#description); \ |
- Handle<Symbol> name = factory->NewSymbol(name##d).ToHandleChecked(); \ |
name->set_is_well_known_symbol(true); \ |
+ name->set_name(*name##d); \ |
roots_[k##name##RootIndex] = *name; |
WELL_KNOWN_SYMBOL_LIST(SYMBOL_INIT) |
#undef SYMBOL_INIT |
@@ -4074,7 +4076,6 @@ |
Symbol::cast(result) |
->set_hash_field(Name::kIsNotArrayIndexMask | (hash << Name::kHashShift)); |
Symbol::cast(result)->set_name(undefined_value()); |
- Symbol::cast(result)->set_descriptive_string(Symbol_parens_string()); |
Symbol::cast(result)->set_flags(0); |
DCHECK(!Symbol::cast(result)->is_private()); |