| 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 --allow-natives-syntax --noalways-opt | 5 // Flags: --noalways-opt |
| 6 // Tests stepping into through Promises. | 6 // Tests stepping into through Promises. |
| 7 | 7 |
| 8 Debug = debug.Debug | 8 Debug = debug.Debug |
| 9 var exception = null; | 9 var exception = null; |
| 10 var break_count = 0; | 10 var break_count = 0; |
| 11 const expected_breaks = 9; | 11 const expected_breaks = 9; |
| 12 | 12 |
| 13 function listener(event, exec_state, event_data, data) { | 13 function listener(event, exec_state, event_data, data) { |
| 14 try { | 14 try { |
| 15 if (event == Debug.DebugEvent.Break) { | 15 if (event == Debug.DebugEvent.Break) { |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 function callback(x) { | 50 function callback(x) { |
| 51 return x; // Break 2. // Break 4. // Break 6. | 51 return x; // Break 2. // Break 4. // Break 6. |
| 52 } // Break 3. // Break 5. // Break 7. | 52 } // Break 3. // Break 5. // Break 7. |
| 53 | 53 |
| 54 function finalize() { | 54 function finalize() { |
| 55 assertNull(exception); // Break 8. | 55 assertNull(exception); // Break 8. |
| 56 assertEquals(expected_breaks, break_count); | 56 assertEquals(expected_breaks, break_count); |
| 57 | 57 |
| 58 Debug.setListener(null); | 58 Debug.setListener(null); |
| 59 } | 59 } |
| OLD | NEW |