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

Unified Diff: src/runtime/runtime-debug.cc

Issue 1916343002: [debugger] do not expose temporary variables introduced by the parser. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.h ('k') | test/mjsunit/debug-scopes.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-debug.cc
diff --git a/src/runtime/runtime-debug.cc b/src/runtime/runtime-debug.cc
index e59ed027078b7b1570a5d193aa3a26a195b6248d..9a54a824ca2a16659208b9b50040261a65f1c1d7 100644
--- a/src/runtime/runtime-debug.cc
+++ b/src/runtime/runtime-debug.cc
@@ -571,7 +571,9 @@ RUNTIME_FUNCTION(Runtime_GetFrameDetails) {
for (int slot = 0; slot < scope_info->LocalCount(); ++slot) {
// Hide compiler-introduced temporary variables, whether on the stack or on
// the context.
- if (scope_info->LocalIsSynthetic(slot)) local_count--;
+ if (ScopeInfo::VariableIsSynthetic(scope_info->LocalName(slot))) {
+ local_count--;
+ }
}
Handle<FixedArray> locals =
@@ -582,7 +584,7 @@ RUNTIME_FUNCTION(Runtime_GetFrameDetails) {
int i = 0;
for (; i < scope_info->StackLocalCount(); ++i) {
// Use the value from the stack.
- if (scope_info->LocalIsSynthetic(i)) continue;
+ if (ScopeInfo::VariableIsSynthetic(scope_info->LocalName(i))) continue;
locals->set(local * 2, scope_info->LocalName(i));
Handle<Object> value = frame_inspector.GetExpression(i);
// TODO(yangguo): We convert optimized out values to {undefined} when they
@@ -596,8 +598,8 @@ RUNTIME_FUNCTION(Runtime_GetFrameDetails) {
Handle<Context> context(
Handle<Context>::cast(frame_inspector.GetContext())->closure_context());
for (; i < scope_info->LocalCount(); ++i) {
- if (scope_info->LocalIsSynthetic(i)) continue;
Handle<String> name(scope_info->LocalName(i));
+ if (ScopeInfo::VariableIsSynthetic(*name)) continue;
VariableMode mode;
InitializationFlag init_flag;
MaybeAssignedFlag maybe_assigned_flag;
« no previous file with comments | « src/objects.h ('k') | test/mjsunit/debug-scopes.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698