Chromium Code Reviews| Index: src/bootstrapper.cc |
| diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc |
| index ce58a86cf5de1e8fbc529a3fbe9a3522b137ffe0..4e155f22f7a45cb67ecf229faed86f0f5039272a 100644 |
| --- a/src/bootstrapper.cc |
| +++ b/src/bootstrapper.cc |
| @@ -1280,7 +1280,18 @@ void Genesis::InitializeExperimentalGlobal() { |
| Handle<JSObject> global = Handle<JSObject>(native_context()->global_object()); |
| // TODO(mstarzinger): Move this into Genesis::InitializeGlobal once we no |
| - // longer need to live behind a flag, so functions get added to the snapshot. |
| + // longer need to live behind flags, so functions get added to the snapshot. |
| + |
| + if (FLAG_harmony_symbols) { |
| + // --- S y m b o l --- |
| + Handle<JSObject> prototype = |
| + factory()->NewJSObject(isolate()->object_function(), TENURED); |
|
Michael Starzinger
2013/03/22 11:39:04
This creates a new object for the prototype of the
rossberg
2013/03/22 12:37:44
Done.
|
| + Handle<JSFunction> symbol_fun = |
| + InstallFunction(global, "Symbol", JS_VALUE_TYPE, JSValue::kSize, |
| + prototype, Builtins::kIllegal, true); |
| + native_context()->set_symbol_function(*symbol_fun); |
| + } |
| + |
| if (FLAG_harmony_collections) { |
| { // -- S e t |
| Handle<JSObject> prototype = |
| @@ -1436,9 +1447,6 @@ void Genesis::InstallNativeFunctions() { |
| } |
| void Genesis::InstallExperimentalNativeFunctions() { |
| - if (FLAG_harmony_symbols) { |
| - INSTALL_NATIVE(JSObject, "SymbolDelegate", symbol_delegate); |
| - } |
| if (FLAG_harmony_proxies) { |
| INSTALL_NATIVE(JSFunction, "DerivedHasTrap", derived_has_trap); |
| INSTALL_NATIVE(JSFunction, "DerivedGetTrap", derived_get_trap); |