OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/debug/debug-scopes.h" | 5 #include "src/debug/debug-scopes.h" |
6 | 6 |
7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/compiler.h" | 8 #include "src/compiler.h" |
9 #include "src/debug/debug.h" | 9 #include "src/debug/debug.h" |
10 #include "src/frames-inl.h" | 10 #include "src/frames-inl.h" |
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
761 .Check(); | 761 .Check(); |
762 } | 762 } |
763 } | 763 } |
764 | 764 |
765 void ScopeIterator::CopyContextExtensionToScopeObject( | 765 void ScopeIterator::CopyContextExtensionToScopeObject( |
766 Handle<Context> context, Handle<JSObject> scope_object, | 766 Handle<Context> context, Handle<JSObject> scope_object, |
767 KeyCollectionType type) { | 767 KeyCollectionType type) { |
768 if (context->extension_object() == nullptr) return; | 768 if (context->extension_object() == nullptr) return; |
769 Handle<JSObject> extension(context->extension_object()); | 769 Handle<JSObject> extension(context->extension_object()); |
770 Handle<FixedArray> keys = | 770 Handle<FixedArray> keys = |
771 KeyAccumulator::GetKeys(extension, type, ENUMERABLE_STRINGS) | 771 JSReceiver::GetKeys(extension, type, ENUMERABLE_STRINGS) |
772 .ToHandleChecked(); | 772 .ToHandleChecked(); |
773 | 773 |
774 for (int i = 0; i < keys->length(); i++) { | 774 for (int i = 0; i < keys->length(); i++) { |
775 // Names of variables introduced by eval are strings. | 775 // Names of variables introduced by eval are strings. |
776 DCHECK(keys->get(i)->IsString()); | 776 DCHECK(keys->get(i)->IsString()); |
777 Handle<String> key(String::cast(keys->get(i))); | 777 Handle<String> key(String::cast(keys->get(i))); |
778 Handle<Object> value = | 778 Handle<Object> value = |
779 Object::GetPropertyOrElement(extension, key).ToHandleChecked(); | 779 Object::GetPropertyOrElement(extension, key).ToHandleChecked(); |
780 JSObject::SetOwnPropertyIgnoreAttributes(scope_object, key, value, NONE) | 780 JSObject::SetOwnPropertyIgnoreAttributes(scope_object, key, value, NONE) |
781 .Check(); | 781 .Check(); |
(...skipping 18 matching lines...) Expand all Loading... |
800 DCHECK((beg_pos >= 0 && end_pos >= 0) || inner_scope->is_hidden()); | 800 DCHECK((beg_pos >= 0 && end_pos >= 0) || inner_scope->is_hidden()); |
801 if (beg_pos <= position && position < end_pos) { | 801 if (beg_pos <= position && position < end_pos) { |
802 GetNestedScopeChain(isolate, inner_scope, position); | 802 GetNestedScopeChain(isolate, inner_scope, position); |
803 return; | 803 return; |
804 } | 804 } |
805 } | 805 } |
806 } | 806 } |
807 | 807 |
808 } // namespace internal | 808 } // namespace internal |
809 } // namespace v8 | 809 } // namespace v8 |
OLD | NEW |