| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Flags: --expose-debug-as debug | |
| 6 | 5 |
| 7 // Get the Debug object exposed from the debug context global object. | |
| 8 Debug = debug.Debug | 6 Debug = debug.Debug |
| 9 | 7 |
| 10 listenerComplete = false; | 8 listenerComplete = false; |
| 11 breakPointCount = 0; | 9 breakPointCount = 0; |
| 12 exception = null; | 10 exception = null; |
| 13 | 11 |
| 14 function listener(event, exec_state, event_data, data) { | 12 function listener(event, exec_state, event_data, data) { |
| 15 if (event != Debug.DebugEvent.Break) return; | 13 if (event != Debug.DebugEvent.Break) return; |
| 16 try { | 14 try { |
| 17 breakPointCount++; | 15 breakPointCount++; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 45 c = (function() { debugger; })()) { | 43 c = (function() { debugger; })()) { |
| 46 var d = 'local'; | 44 var d = 'local'; |
| 47 debugger; | 45 debugger; |
| 48 }; | 46 }; |
| 49 | 47 |
| 50 f(); | 48 f(); |
| 51 | 49 |
| 52 // Make sure that the debug event listener vas invoked. | 50 // Make sure that the debug event listener vas invoked. |
| 53 assertEquals(3, breakPointCount); | 51 assertEquals(3, breakPointCount); |
| 54 assertNull(exception); | 52 assertNull(exception); |
| OLD | NEW |