diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2011-09-07 19:22:41 -0700 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2011-09-07 21:23:29 -0700 |
commit | 0bca54444a5bb869ddebaadc65cd0bf381bb1e81 (patch) | |
tree | 9c4ec90a663e0e17e9922d69bc58479bcd1538bd /deps/v8/src/bootstrapper.cc | |
parent | 526c54c9790cd8edff259686785d7b844fd29005 (diff) | |
download | node-0bca54444a5bb869ddebaadc65cd0bf381bb1e81.tar.gz |
Upgrade V8 to 3.6.1
Diffstat (limited to 'deps/v8/src/bootstrapper.cc')
-rw-r--r-- | deps/v8/src/bootstrapper.cc | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/deps/v8/src/bootstrapper.cc b/deps/v8/src/bootstrapper.cc index 4f7cf4094..7abd45cac 100644 --- a/deps/v8/src/bootstrapper.cc +++ b/deps/v8/src/bootstrapper.cc @@ -350,7 +350,14 @@ static Handle<JSFunction> InstallFunction(Handle<JSObject> target, prototype, call_code, is_ecma_native); - SetLocalPropertyNoThrow(target, symbol, function, DONT_ENUM); + PropertyAttributes attributes; + if (target->IsJSBuiltinsObject()) { + attributes = + static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE | READ_ONLY); + } else { + attributes = DONT_ENUM; + } + SetLocalPropertyNoThrow(target, symbol, function, attributes); if (is_ecma_native) { function->shared()->set_instance_class_name(*symbol); } @@ -1160,7 +1167,7 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> inner_global, { - // Setup the call-as-function delegate. + // Set up the call-as-function delegate. Handle<Code> code = Handle<Code>(isolate->builtins()->builtin( Builtins::kHandleApiCallAsFunction)); @@ -1172,7 +1179,7 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> inner_global, } { - // Setup the call-as-constructor delegate. + // Set up the call-as-constructor delegate. Handle<Code> code = Handle<Code>(isolate->builtins()->builtin( Builtins::kHandleApiCallAsConstructor)); @@ -1192,15 +1199,15 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> inner_global, void Genesis::InitializeExperimentalGlobal() { - Isolate* isolate = this->isolate(); Handle<JSObject> global = Handle<JSObject>(global_context()->global()); // TODO(mstarzinger): Move this into Genesis::InitializeGlobal once we no // longer need to live behind a flag, so WeakMap gets added to the snapshot. if (FLAG_harmony_weakmaps) { // -- W e a k M a p + Handle<JSObject> prototype = + factory()->NewJSObject(isolate()->object_function(), TENURED); InstallFunction(global, "WeakMap", JS_WEAK_MAP_TYPE, JSWeakMap::kSize, - isolate->initial_object_prototype(), - Builtins::kIllegal, true); + prototype, Builtins::kIllegal, true); } } @@ -1677,7 +1684,6 @@ bool Genesis::InstallNatives() { global_context()->set_regexp_result_map(*initial_map); } - #ifdef DEBUG builtins->Verify(); #endif |