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

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

Issue 2014523002: Reland of [keys] Simplify KeyAccumulator (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixing wrong handle dereferencing Created 4 years, 7 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
« no previous file with comments | « src/builtins.cc ('k') | src/elements.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 750 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 JSReceiver::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)));
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
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
« no previous file with comments | « src/builtins.cc ('k') | src/elements.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698