Chromium Code Reviews| 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 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 474 debug.ScopeType.Block, | 474 debug.ScopeType.Block, |
| 475 debug.ScopeType.Local, | 475 debug.ScopeType.Local, |
| 476 debug.ScopeType.Script, | 476 debug.ScopeType.Script, |
| 477 debug.ScopeType.Global], exec_state); | 477 debug.ScopeType.Global], exec_state); |
| 478 CheckScopeContent({x:3,y:5}, 0, exec_state); | 478 CheckScopeContent({x:3,y:5}, 0, exec_state); |
| 479 CheckScopeContent({x:3,y:5}, 1, exec_state); | 479 CheckScopeContent({x:3,y:5}, 1, exec_state); |
| 480 CheckScopeContent({}, 2, exec_state); | 480 CheckScopeContent({}, 2, exec_state); |
| 481 }; | 481 }; |
| 482 for_loop_5(); | 482 for_loop_5(); |
| 483 EndTest(); | 483 EndTest(); |
| 484 | |
| 485 | |
| 486 // Uninitialized variables | |
| 487 BeginTest("Uninitialized 1"); | |
| 488 | |
| 489 function uninitialized_1() { | |
| 490 { | |
| 491 debugger; | |
| 492 let x = 1; | |
| 493 } | |
| 494 } | |
| 495 | |
| 496 listener_delegate = function(exec_state) { | |
| 497 CheckScopeChain([debug.ScopeType.Block, | |
| 498 debug.ScopeType.Local, | |
| 499 debug.ScopeType.Script, | |
| 500 debug.ScopeType.Global], exec_state); | |
| 501 CheckScopeContent({}, 0, exec_state); | |
|
aandrey
2014/12/08 13:12:22
DevTools will not show empty Block scopes. Should
Dmitry Lomov (no reviews)
2014/12/08 14:34:09
I do not know what is best here. This change makes
| |
| 502 }; | |
| 503 uninitialized_1(); | |
| 504 EndTest(); | |
| OLD | NEW |