| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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 var failure = null; | 6 var failure = null; |
| 8 var args; | 7 var args; |
| 9 | 8 |
| 10 function listener(event, exec_state, event_data, data) { | 9 function listener(event, exec_state, event_data, data) { |
| 11 if (event != debug.Debug.DebugEvent.Break) return; | 10 if (event != debug.Debug.DebugEvent.Break) return; |
| 12 try { | 11 try { |
| 13 args = exec_state.frame(0).evaluate('arguments').value(); | 12 args = exec_state.frame(0).evaluate('arguments').value(); |
| 14 } catch (e) { | 13 } catch (e) { |
| 15 failure = e; | 14 failure = e; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 35 assertEquals(2, args.length); | 34 assertEquals(2, args.length); |
| 36 assertEquals(undefined, args[0]); | 35 assertEquals(undefined, args[0]); |
| 37 assertEquals(undefined, args[1]); | 36 assertEquals(undefined, args[1]); |
| 38 | 37 |
| 39 foo.next() | 38 foo.next() |
| 40 assertEquals(2, args.length); | 39 assertEquals(2, args.length); |
| 41 assertEquals(undefined, args[0]); | 40 assertEquals(undefined, args[0]); |
| 42 assertEquals(undefined, args[1]); | 41 assertEquals(undefined, args[1]); |
| 43 | 42 |
| 44 assertNull(failure); | 43 assertNull(failure); |
| OLD | NEW |