diff options
author | Ali Ijaz Sheikh <ofrobots@google.com> | 2016-01-20 09:45:45 -0800 |
---|---|---|
committer | Ali Ijaz Sheikh <ofrobots@google.com> | 2016-01-21 16:53:58 -0800 |
commit | ef4170ea03a80b21b2d8a65ce432efaa370fe2fa (patch) | |
tree | e382b1b38b729cd8155b56b441c3a563914854a3 /deps/v8/src/contexts.cc | |
parent | 5f6dfab832979999d2f806fc1a2f1c11a25b0f35 (diff) | |
download | android-node-v8-ef4170ea03a80b21b2d8a65ce432efaa370fe2fa.tar.gz android-node-v8-ef4170ea03a80b21b2d8a65ce432efaa370fe2fa.tar.bz2 android-node-v8-ef4170ea03a80b21b2d8a65ce432efaa370fe2fa.zip |
deps: upgrade to V8 4.8.271.17
Pick up V8 4.8 branch-head. This branch brings in @@isConcatSpreadable,
@@toPrimitive and ToLength ES6 changes. For full details see:
http://v8project.blogspot.de/2015/11/v8-release-48.html
https://github.com/v8/v8/commit/fa163e2
Ref: https://github.com/nodejs/node/pull/4399
PR-URL: https://github.com/nodejs/node/pull/4785
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'deps/v8/src/contexts.cc')
-rw-r--r-- | deps/v8/src/contexts.cc | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/deps/v8/src/contexts.cc b/deps/v8/src/contexts.cc index a008d49ac3..67d19a1eff 100644 --- a/deps/v8/src/contexts.cc +++ b/deps/v8/src/contexts.cc @@ -118,17 +118,6 @@ String* Context::catch_name() { } -JSBuiltinsObject* Context::builtins() { - GlobalObject* object = global_object(); - if (object->IsJSGlobalObject()) { - return JSGlobalObject::cast(object)->builtins(); - } else { - DCHECK(object->IsJSBuiltinsObject()); - return JSBuiltinsObject::cast(object); - } -} - - Context* Context::script_context() { Context* current = this; while (!current->IsScriptContext()) { @@ -144,7 +133,7 @@ Context* Context::native_context() { // The global object has a direct pointer to the native context. If the // following DCHECK fails, the native context is probably being accessed // indirectly during bootstrapping. This is unsupported. - DCHECK(global_object()->IsGlobalObject()); + DCHECK(global_object()->IsJSGlobalObject()); return global_object()->native_context(); } @@ -264,7 +253,8 @@ Handle<Object> Context::Lookup(Handle<String> name, } // 1. Check global objects, subjects of with, and extension objects. - if ((context->IsNativeContext() || context->IsWithContext() || + if ((context->IsNativeContext() || + (context->IsWithContext() && ((flags & SKIP_WITH_CONTEXT) == 0)) || context->IsFunctionContext() || context->IsBlockContext()) && context->extension_receiver() != nullptr) { Handle<JSReceiver> object(context->extension_receiver()); @@ -384,7 +374,9 @@ Handle<Object> Context::Lookup(Handle<String> name, } // 3. Prepare to continue with the previous (next outermost) context. - if (context->IsNativeContext()) { + if (context->IsNativeContext() || + ((flags & STOP_AT_DECLARATION_SCOPE) != 0 && + context->is_declaration_context())) { follow_context_chain = false; } else { context = Handle<Context>(context->previous(), isolate); @@ -581,10 +573,20 @@ bool Context::IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object) { // During bootstrapping we allow all objects to pass as global // objects. This is necessary to fix circular dependencies. return isolate->heap()->gc_state() != Heap::NOT_IN_GC || - isolate->bootstrapper()->IsActive() || - object->IsGlobalObject(); + isolate->bootstrapper()->IsActive() || object->IsJSGlobalObject(); } #endif + +void Context::IncrementErrorsThrown() { + DCHECK(IsNativeContext()); + + int previous_value = errors_thrown()->value(); + set_errors_thrown(Smi::FromInt(previous_value + 1)); +} + + +int Context::GetErrorsThrown() { return errors_thrown()->value(); } + } // namespace internal } // namespace v8 |