Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(455)

Side by Side Diff: src/debug/debug-scopes.cc

Issue 2002203002: [api] Add more parameters to Object::GetPropertyNames (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@2016-05-06_keys_fast_path_1995263002
Patch Set: reverting accidental formatting Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 if (value->IsTheHole()) continue; 757 if (value->IsTheHole()) continue;
758 // This should always succeed. 758 // This should always succeed.
759 // TODO(verwaest): Use AddDataProperty instead. 759 // TODO(verwaest): Use AddDataProperty instead.
760 JSObject::SetOwnPropertyIgnoreAttributes(scope_object, name, value, NONE) 760 JSObject::SetOwnPropertyIgnoreAttributes(scope_object, name, value, NONE)
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 KeysCollectionLimit 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 KeyAccumulator::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)));
(...skipping 22 matching lines...) Expand all
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698