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

Side by Side Diff: test/mjsunit/debug-scopes.js

Issue 1146733002: Revert of Reapply "Resolve references to "this" the same way as normal variables"" (Closed) Base URL: https://chromium.googlesource.com/v8/v8@master
Patch Set: Created 5 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/cctest/test-serialize.cc ('k') | test/mjsunit/harmony/arrow-functions-this.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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 } 160 }
161 count++; 161 count++;
162 } 162 }
163 163
164 // 'arguments' and might be exposed in the local and closure scope. Just 164 // 'arguments' and might be exposed in the local and closure scope. Just
165 // ignore this. 165 // ignore this.
166 var scope_size = scope.scopeObject().properties().length; 166 var scope_size = scope.scopeObject().properties().length;
167 if (!scope.scopeObject().property('arguments').isUndefined()) { 167 if (!scope.scopeObject().property('arguments').isUndefined()) {
168 scope_size--; 168 scope_size--;
169 } 169 }
170 // Ditto for 'this'.
171 if (!scope.scopeObject().property('this').isUndefined()) {
172 scope_size--;
173 }
174 // Skip property with empty name. 170 // Skip property with empty name.
175 if (!scope.scopeObject().property('').isUndefined()) { 171 if (!scope.scopeObject().property('').isUndefined()) {
176 scope_size--; 172 scope_size--;
177 } 173 }
178 174
179 if (count != scope_size) { 175 if (count != scope_size) {
180 print('Names found in scope:'); 176 print('Names found in scope:');
181 var names = scope.scopeObject().propertyNames(); 177 var names = scope.scopeObject().propertyNames();
182 for (var i = 0; i < names.length; i++) { 178 for (var i = 0; i < names.length; i++) {
183 print(names[i]); 179 print(names[i]);
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 new C1().m(); 1069 new C1().m();
1074 })(); 1070 })();
1075 1071
1076 EndTest(); 1072 EndTest();
1077 1073
1078 1074
1079 assertEquals(begin_test_count, break_count, 1075 assertEquals(begin_test_count, break_count,
1080 'one or more tests did not enter the debugger'); 1076 'one or more tests did not enter the debugger');
1081 assertEquals(begin_test_count, end_test_count, 1077 assertEquals(begin_test_count, end_test_count,
1082 'one or more tests did not have its result checked'); 1078 'one or more tests did not have its result checked');
OLDNEW
« no previous file with comments | « test/cctest/test-serialize.cc ('k') | test/mjsunit/harmony/arrow-functions-this.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698