| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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: --allow-natives-syntax --expose-debug-as debug | |
| 6 | 5 |
| 7 Debug = debug.Debug | 6 Debug = debug.Debug |
| 8 var exception = null; | 7 var exception = null; |
| 9 var break_count = 0; | 8 var break_count = 0; |
| 10 const expected_breaks = 9; | 9 const expected_breaks = 9; |
| 11 | 10 |
| 12 function listener(event, exec_state, event_data, data) { | 11 function listener(event, exec_state, event_data, data) { |
| 13 try { | 12 try { |
| 14 if (event == Debug.DebugEvent.Break) { | 13 if (event == Debug.DebugEvent.Break) { |
| 15 assertTrue(exec_state.frameCount() != 0, "FAIL: Empty stack trace"); | 14 assertTrue(exec_state.frameCount() != 0, "FAIL: Empty stack trace"); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 Promise.resolve().then(function() { | 65 Promise.resolve().then(function() { |
| 67 if (expected_breaks !== break_count) { | 66 if (expected_breaks !== break_count) { |
| 68 %AbortJS("FAIL: expected <" + expected_breaks + "> breaks instead of <" + | 67 %AbortJS("FAIL: expected <" + expected_breaks + "> breaks instead of <" + |
| 69 break_count + ">"); | 68 break_count + ">"); |
| 70 } | 69 } |
| 71 if (exception !== null) { | 70 if (exception !== null) { |
| 72 %AbortJS("FAIL: exception: " + exception); | 71 %AbortJS("FAIL: exception: " + exception); |
| 73 } | 72 } |
| 74 }); | 73 }); |
| 75 } | 74 } |
| OLD | NEW |