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

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

Issue 1286653004: Remove redundant handle in ScopeIterator constructor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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 | « no previous file | no next file » | 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/debug/debug.h" 7 #include "src/debug/debug.h"
8 #include "src/globals.h" 8 #include "src/globals.h"
9 #include "src/parser.h" 9 #include "src/parser.h"
10 #include "src/scopes.h" 10 #include "src/scopes.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 if (scope_info->scope_type() == FUNCTION_SCOPE || 76 if (scope_info->scope_type() == FUNCTION_SCOPE ||
77 scope_info->scope_type() == ARROW_SCOPE) { 77 scope_info->scope_type() == ARROW_SCOPE) {
78 nested_scope_chain_.Add(scope_info); 78 nested_scope_chain_.Add(scope_info);
79 } 79 }
80 } else { 80 } else {
81 // Reparse the code and analyze the scopes. 81 // Reparse the code and analyze the scopes.
82 Handle<Script> script(Script::cast(shared_info->script())); 82 Handle<Script> script(Script::cast(shared_info->script()));
83 Scope* scope = NULL; 83 Scope* scope = NULL;
84 84
85 // Check whether we are in global, eval or function code. 85 // Check whether we are in global, eval or function code.
86 Handle<ScopeInfo> scope_info(shared_info->scope_info());
87 Zone zone; 86 Zone zone;
88 if (scope_info->scope_type() != FUNCTION_SCOPE && 87 if (scope_info->scope_type() != FUNCTION_SCOPE &&
89 scope_info->scope_type() != ARROW_SCOPE) { 88 scope_info->scope_type() != ARROW_SCOPE) {
90 // Global or eval code. 89 // Global or eval code.
91 ParseInfo info(&zone, script); 90 ParseInfo info(&zone, script);
92 if (scope_info->scope_type() == SCRIPT_SCOPE) { 91 if (scope_info->scope_type() == SCRIPT_SCOPE) {
93 info.set_global(); 92 info.set_global();
94 } else { 93 } else {
95 DCHECK(scope_info->scope_type() == EVAL_SCOPE); 94 DCHECK(scope_info->scope_type() == EVAL_SCOPE);
96 info.set_eval(); 95 info.set_eval();
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 // TODO(verwaest): Use AddDataProperty instead. 759 // TODO(verwaest): Use AddDataProperty instead.
761 JSObject::SetOwnPropertyIgnoreAttributes( 760 JSObject::SetOwnPropertyIgnoreAttributes(
762 scope_object, handle(String::cast(scope_info->get(i + start))), value, 761 scope_object, handle(String::cast(scope_info->get(i + start))), value,
763 ::NONE) 762 ::NONE)
764 .Check(); 763 .Check();
765 } 764 }
766 } 765 }
767 766
768 } // namespace internal 767 } // namespace internal
769 } // namespace v8 768 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698