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