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

Side by Side Diff: test/mjsunit/es6/debug-blockscopes.js

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, 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 | « test/mjsunit/debug-scopes.js ('k') | test/mjsunit/regress/regress-crbug-582048.js » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 } 141 }
142 count++; 142 count++;
143 } 143 }
144 144
145 // 'arguments' and might be exposed in the local and closure scope. Just 145 // 'arguments' and might be exposed in the local and closure scope. Just
146 // ignore this. 146 // ignore this.
147 var scope_size = scope.scopeObject().properties().length; 147 var scope_size = scope.scopeObject().properties().length;
148 if (!scope.scopeObject().property('arguments').isUndefined()) { 148 if (!scope.scopeObject().property('arguments').isUndefined()) {
149 scope_size--; 149 scope_size--;
150 } 150 }
151 // Skip property with empty name. 151 // Temporary variables introduced by the parser have not been materialized.
152 if (!scope.scopeObject().property('').isUndefined()) { 152 assertTrue(scope.scopeObject().property('').isUndefined());
153 scope_size--;
154 }
155 153
156 if (count != scope_size) { 154 if (count != scope_size) {
157 print('Names found in scope:'); 155 print('Names found in scope:');
158 var names = scope.scopeObject().propertyNames(); 156 var names = scope.scopeObject().propertyNames();
159 for (var i = 0; i < names.length; i++) { 157 for (var i = 0; i < names.length; i++) {
160 print(names[i]); 158 print(names[i]);
161 } 159 }
162 } 160 }
163 assertEquals(count, scope_size); 161 assertEquals(count, scope_size);
164 162
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 debugger; 530 debugger;
533 } 531 }
534 } 532 }
535 533
536 listener_delegate = function (exec_state) { 534 listener_delegate = function (exec_state) {
537 assertEqualsUnlessOptimized(0, exec_state.frame(0).evaluate("i").value()); 535 assertEqualsUnlessOptimized(0, exec_state.frame(0).evaluate("i").value());
538 assertEqualsUnlessOptimized(5, exec_state.frame(0).evaluate("j").value()); 536 assertEqualsUnlessOptimized(5, exec_state.frame(0).evaluate("j").value());
539 } 537 }
540 shadowing_2(); 538 shadowing_2();
541 EndTest(); 539 EndTest();
OLDNEW
« no previous file with comments | « test/mjsunit/debug-scopes.js ('k') | test/mjsunit/regress/regress-crbug-582048.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698