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-wasm | 5 // Flags: --expose-wasm |
6 | 6 |
| 7 let {session, contextGroup, Protocol} = InspectorTest.start('Tests breakable loc
ations in wasm'); |
| 8 |
7 utils.load('test/mjsunit/wasm/wasm-constants.js'); | 9 utils.load('test/mjsunit/wasm/wasm-constants.js'); |
8 utils.load('test/mjsunit/wasm/wasm-module-builder.js'); | 10 utils.load('test/mjsunit/wasm/wasm-module-builder.js'); |
9 | 11 |
10 var builder = new WasmModuleBuilder(); | 12 var builder = new WasmModuleBuilder(); |
11 | 13 |
12 // clang-format off | 14 // clang-format off |
13 var func_idx = builder.addFunction('helper', kSig_v_v) | 15 var func_idx = builder.addFunction('helper', kSig_v_v) |
14 .addLocals({i32_count: 1}) | 16 .addLocals({i32_count: 1}) |
15 .addBody([ | 17 .addBody([ |
16 kExprNop, | 18 kExprNop, |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 } | 201 } |
200 | 202 |
201 function waitForAllPauses() { | 203 function waitForAllPauses() { |
202 InspectorTest.log('Missing breakpoints: ' + allBreakableLocations.length); | 204 InspectorTest.log('Missing breakpoints: ' + allBreakableLocations.length); |
203 if (allBreakableLocations.length == 0) return; | 205 if (allBreakableLocations.length == 0) return; |
204 return Protocol.Debugger.oncePaused() | 206 return Protocol.Debugger.oncePaused() |
205 .then(removePausedLocation) | 207 .then(removePausedLocation) |
206 .then(Protocol.Debugger.resume()) | 208 .then(Protocol.Debugger.resume()) |
207 .then(waitForAllPauses); | 209 .then(waitForAllPauses); |
208 } | 210 } |
OLD | NEW |