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: --noturbo-osr --expose-debug-as debug | 5 // Flags: --noturbo-osr --noturbo-inlining --expose-debug-as debug |
6 | 6 |
7 var stdlib = this; | 7 var stdlib = this; |
8 var buffer = new ArrayBuffer(64 * 1024); | 8 var buffer = new ArrayBuffer(64 * 1024); |
9 var foreign = { thrower: thrower, debugme: debugme } | 9 var foreign = { thrower: thrower, debugme: debugme } |
10 | 10 |
11 // Get the Debug object exposed from the debug context global object. | 11 // Get the Debug object exposed from the debug context global object. |
12 Debug = debug.Debug; | 12 Debug = debug.Debug; |
13 | 13 |
14 var listenerCalled = false; | 14 var listenerCalled = false; |
15 function listener(event, exec_state, event_data, data) { | 15 function listener(event, exec_state, event_data, data) { |
(...skipping 30 matching lines...) Loading... |
46 return i|0; | 46 return i|0; |
47 } | 47 } |
48 return { foo: foo }; | 48 return { foo: foo }; |
49 } | 49 } |
50 | 50 |
51 var m = Module(stdlib, foreign, buffer); | 51 var m = Module(stdlib, foreign, buffer); |
52 | 52 |
53 assertThrows("m.foo(0)"); | 53 assertThrows("m.foo(0)"); |
54 assertEquals(23, m.foo(1)); | 54 assertEquals(23, m.foo(1)); |
55 assertTrue(listenerCalled); | 55 assertTrue(listenerCalled); |
OLD | NEW |