OLD | NEW |
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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 // 'arguments' and might be exposed in the local and closure scope. Just | 176 // 'arguments' and might be exposed in the local and closure scope. Just |
177 // ignore this. | 177 // ignore this. |
178 var scope_size = scope.scopeObject().properties().length; | 178 var scope_size = scope.scopeObject().properties().length; |
179 if (!scope.scopeObject().property('arguments').isUndefined()) { | 179 if (!scope.scopeObject().property('arguments').isUndefined()) { |
180 scope_size--; | 180 scope_size--; |
181 } | 181 } |
182 // Ditto for 'this'. | 182 // Ditto for 'this'. |
183 if (!scope.scopeObject().property('this').isUndefined()) { | 183 if (!scope.scopeObject().property('this').isUndefined()) { |
184 scope_size--; | 184 scope_size--; |
185 } | 185 } |
186 // Skip property with empty name. | 186 // Temporary variables introduced by the parser have not been materialized. |
187 if (!scope.scopeObject().property('').isUndefined()) { | 187 assertTrue(scope.scopeObject().property('').isUndefined()); |
188 scope_size--; | |
189 } | |
190 | 188 |
191 if (count != scope_size) { | 189 if (count != scope_size) { |
192 print('Names found in scope:'); | 190 print('Names found in scope:'); |
193 var names = scope.scopeObject().propertyNames(); | 191 var names = scope.scopeObject().propertyNames(); |
194 for (var i = 0; i < names.length; i++) { | 192 for (var i = 0; i < names.length; i++) { |
195 print(names[i]); | 193 print(names[i]); |
196 } | 194 } |
197 } | 195 } |
198 assertEquals(count, scope_size); | 196 assertEquals(count, scope_size); |
199 | 197 |
(...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1184 debug.ScopeType.Global], exec_state); | 1182 debug.ScopeType.Global], exec_state); |
1185 CheckScopeChainPositions([{start: 52, end: 111}, {start: 22, end: 145}, {}, {}
], exec_state); | 1183 CheckScopeChainPositions([{start: 52, end: 111}, {start: 22, end: 145}, {}, {}
], exec_state); |
1186 } | 1184 } |
1187 eval(code3); | 1185 eval(code3); |
1188 EndTest(); | 1186 EndTest(); |
1189 | 1187 |
1190 assertEquals(begin_test_count, break_count, | 1188 assertEquals(begin_test_count, break_count, |
1191 'one or more tests did not enter the debugger'); | 1189 'one or more tests did not enter the debugger'); |
1192 assertEquals(begin_test_count, end_test_count, | 1190 assertEquals(begin_test_count, end_test_count, |
1193 'one or more tests did not have its result checked'); | 1191 'one or more tests did not have its result checked'); |
OLD | NEW |