| 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 | |
| 6 | 5 |
| 7 // Test debug events when we only listen to uncaught exceptions and a | 6 // Test debug events when we only listen to uncaught exceptions and a |
| 8 // Promise p3 created by Promise.all has a catch handler, and is rejected | 7 // Promise p3 created by Promise.all has a catch handler, and is rejected |
| 9 // because one of the Promises p2 passed to Promise.all is rejected. We | 8 // because one of the Promises p2 passed to Promise.all is rejected. We |
| 10 // expect no Exception debug event to be triggered, since p3 and by | 9 // expect no Exception debug event to be triggered, since p3 and by |
| 11 // extension p2 have a catch handler. | 10 // extension p2 have a catch handler. |
| 12 | 11 |
| 13 var Debug = debug.Debug; | 12 var Debug = debug.Debug; |
| 14 | 13 |
| 15 var expected_events = 2; | 14 var expected_events = 2; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 31 function listener(event, exec_state, event_data, data) { | 30 function listener(event, exec_state, event_data, data) { |
| 32 try { | 31 try { |
| 33 assertTrue(event != Debug.DebugEvent.Exception) | 32 assertTrue(event != Debug.DebugEvent.Exception) |
| 34 } catch (e) { | 33 } catch (e) { |
| 35 %AbortJS(e + "\n" + e.stack); | 34 %AbortJS(e + "\n" + e.stack); |
| 36 } | 35 } |
| 37 } | 36 } |
| 38 | 37 |
| 39 Debug.setBreakOnUncaughtException(); | 38 Debug.setBreakOnUncaughtException(); |
| 40 Debug.setListener(listener); | 39 Debug.setListener(listener); |
| OLD | NEW |