Index: src/bootstrapper.cc |
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc |
index eeb1f3ce4583cb441d28181d02c66ce4b8db63b8..eb8cd7c5a5e7ca63c2bd25de4f2682ed651b7a20 100644 |
--- a/src/bootstrapper.cc |
+++ b/src/bootstrapper.cc |
@@ -1561,9 +1561,6 @@ void Genesis::InstallNativeFunctions() { |
native_object_get_notifier); |
INSTALL_NATIVE(JSFunction, "NativeObjectNotifierPerformChange", |
native_object_notifier_perform_change); |
- |
- INSTALL_NATIVE(Symbol, "symbolIterator", iterator_symbol); |
- INSTALL_NATIVE(Symbol, "symbolUnscopables", unscopables_symbol); |
INSTALL_NATIVE(JSFunction, "ArrayValues", array_values_iterator); |
#define INSTALL_NATIVE_FUNCTIONS_FOR(id, descr) InstallNativeFunctions_##id(); |
@@ -1988,6 +1985,17 @@ bool Genesis::InstallNatives() { |
return true; |
} |
+ // Install public symbols. |
+ { |
+ static const PropertyAttributes attributes = |
+ static_cast<PropertyAttributes>(READ_ONLY | DONT_DELETE); |
+#define INSTALL_PUBLIC_SYMBOL(name, varname, description) \ |
+ Handle<String> varname = factory()->NewStringFromStaticChars(#varname); \ |
+ JSObject::AddProperty(builtins, varname, factory()->name(), attributes); |
+ PUBLIC_SYMBOL_LIST(INSTALL_PUBLIC_SYMBOL) |
+#undef INSTALL_PUBLIC_SYMBOL |
+ } |
+ |
// Install natives. |
for (int i = Natives::GetDebuggerCount(); |
i < Natives::GetBuiltinsCount(); |
@@ -2114,22 +2122,22 @@ bool Genesis::InstallNatives() { |
Handle<AccessorInfo> arguments_iterator = |
Accessors::ArgumentsIteratorInfo(isolate(), attribs); |
{ |
- CallbacksDescriptor d(Handle<Name>(native_context()->iterator_symbol()), |
- arguments_iterator, attribs); |
+ CallbacksDescriptor d(factory()->iterator_symbol(), arguments_iterator, |
+ attribs); |
Handle<Map> map(native_context()->sloppy_arguments_map()); |
Map::EnsureDescriptorSlack(map, 1); |
map->AppendDescriptor(&d); |
} |
{ |
- CallbacksDescriptor d(Handle<Name>(native_context()->iterator_symbol()), |
- arguments_iterator, attribs); |
+ CallbacksDescriptor d(factory()->iterator_symbol(), arguments_iterator, |
+ attribs); |
Handle<Map> map(native_context()->aliased_arguments_map()); |
Map::EnsureDescriptorSlack(map, 1); |
map->AppendDescriptor(&d); |
} |
{ |
- CallbacksDescriptor d(Handle<Name>(native_context()->iterator_symbol()), |
- arguments_iterator, attribs); |
+ CallbacksDescriptor d(factory()->iterator_symbol(), arguments_iterator, |
+ attribs); |
Handle<Map> map(native_context()->strict_arguments_map()); |
Map::EnsureDescriptorSlack(map, 1); |
map->AppendDescriptor(&d); |