diff options
Diffstat (limited to 'deps/v8/src/bootstrapper.cc')
-rw-r--r-- | deps/v8/src/bootstrapper.cc | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/deps/v8/src/bootstrapper.cc b/deps/v8/src/bootstrapper.cc index 58b2ad038..f57a1f6fd 100644 --- a/deps/v8/src/bootstrapper.cc +++ b/deps/v8/src/bootstrapper.cc @@ -303,9 +303,9 @@ Handle<Context> Bootstrapper::CreateEnvironment( v8::ExtensionConfiguration* extensions) { HandleScope scope(isolate_); Genesis genesis(isolate_, global_object, global_template, extensions); - Handle<Object> context(isolate_->global_handles()->Create(*genesis.result())); - Handle<Context> env = Handle<Context>::cast(context); - if (!env.is_null()) { + if (!genesis.result().is_null()) { + Handle<Object> ctx(isolate_->global_handles()->Create(*genesis.result())); + Handle<Context> env = Handle<Context>::cast(ctx); if (InstallExtensions(env, extensions)) { return env; } @@ -1280,7 +1280,17 @@ 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<JSFunction> symbol_fun = + InstallFunction(global, "Symbol", JS_VALUE_TYPE, JSValue::kSize, + isolate()->initial_object_prototype(), + Builtins::kIllegal, true); + native_context()->set_symbol_function(*symbol_fun); + } + if (FLAG_harmony_collections) { { // -- S e t Handle<JSObject> prototype = @@ -1301,6 +1311,16 @@ void Genesis::InitializeExperimentalGlobal() { prototype, Builtins::kIllegal, true); } } + + if (FLAG_harmony_typed_arrays) { + { // -- A r r a y B u f f e r + Handle<JSObject> prototype = + factory()->NewJSObject(isolate()->object_function(), TENURED); + InstallFunction(global, "__ArrayBuffer", JS_ARRAY_BUFFER_TYPE, + JSArrayBuffer::kSize, prototype, + Builtins::kIllegal, true); + } + } } @@ -1436,9 +1456,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); @@ -1911,6 +1928,11 @@ bool Genesis::InstallExperimentalNatives() { "native object-observe.js") == 0) { if (!CompileExperimentalBuiltin(isolate(), i)) return false; } + if (FLAG_harmony_typed_arrays && + strcmp(ExperimentalNatives::GetScriptName(i).start(), + "native typedarray.js") == 0) { + if (!CompileExperimentalBuiltin(isolate(), i)) return false; + } } InstallExperimentalNativeFunctions(); |