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

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

Issue 1961963002: [debugger] make strict eval-scope visible to debugging. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase 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 | « no previous file | src/debug/debug-scopes.h » ('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-evaluate.h" 5 #include "src/debug/debug-evaluate.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/contexts.h" 8 #include "src/contexts.h"
9 #include "src/debug/debug.h" 9 #include "src/debug/debug.h"
10 #include "src/debug/debug-frames.h" 10 #include "src/debug/debug-frames.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 evaluation_context_ = outer_context; 176 evaluation_context_ = outer_context;
177 break; 177 break;
178 } else if (scope_type == ScopeIterator::ScopeTypeCatch || 178 } else if (scope_type == ScopeIterator::ScopeTypeCatch ||
179 scope_type == ScopeIterator::ScopeTypeWith) { 179 scope_type == ScopeIterator::ScopeTypeWith) {
180 ContextChainElement context_chain_element; 180 ContextChainElement context_chain_element;
181 Handle<Context> current_context = it.CurrentContext(); 181 Handle<Context> current_context = it.CurrentContext();
182 if (!current_context->IsDebugEvaluateContext()) { 182 if (!current_context->IsDebugEvaluateContext()) {
183 context_chain_element.wrapped_context = current_context; 183 context_chain_element.wrapped_context = current_context;
184 } 184 }
185 context_chain_.Add(context_chain_element); 185 context_chain_.Add(context_chain_element);
186 } else if (scope_type == ScopeIterator::ScopeTypeBlock) { 186 } else if (scope_type == ScopeIterator::ScopeTypeBlock ||
187 scope_type == ScopeIterator::ScopeTypeEval) {
187 Handle<JSObject> materialized = factory->NewJSObjectWithNullProto(); 188 Handle<JSObject> materialized = factory->NewJSObjectWithNullProto();
188 frame_inspector.MaterializeStackLocals(materialized, 189 frame_inspector.MaterializeStackLocals(materialized,
189 it.CurrentScopeInfo()); 190 it.CurrentScopeInfo());
190 ContextChainElement context_chain_element; 191 ContextChainElement context_chain_element;
191 context_chain_element.scope_info = it.CurrentScopeInfo(); 192 context_chain_element.scope_info = it.CurrentScopeInfo();
192 context_chain_element.materialized_object = materialized; 193 context_chain_element.materialized_object = materialized;
193 if (it.HasContext()) { 194 if (it.HasContext()) {
194 context_chain_element.wrapped_context = it.CurrentContext(); 195 context_chain_element.wrapped_context = it.CurrentContext();
195 } 196 }
196 context_chain_.Add(context_chain_element); 197 context_chain_.Add(context_chain_element);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 // referenced by the current function, so it can be correctly resolved. 250 // referenced by the current function, so it can be correctly resolved.
250 return; 251 return;
251 } else if (local_function->shared()->scope_info()->HasReceiver()) { 252 } else if (local_function->shared()->scope_info()->HasReceiver()) {
252 recv = handle(frame_->receiver(), isolate_); 253 recv = handle(frame_->receiver(), isolate_);
253 } 254 }
254 JSObject::SetOwnPropertyIgnoreAttributes(target, name, recv, NONE).Check(); 255 JSObject::SetOwnPropertyIgnoreAttributes(target, name, recv, NONE).Check();
255 } 256 }
256 257
257 } // namespace internal 258 } // namespace internal
258 } // namespace v8 259 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/debug/debug-scopes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698