| 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 // clang-format off | 5 // clang-format off |
| 6 // Flags: --expose-wasm | 6 // Flags: --expose-wasm |
| 7 | 7 |
| 8 load("test/mjsunit/wasm/wasm-constants.js"); | 8 load("test/mjsunit/wasm/wasm-constants.js"); |
| 9 load("test/mjsunit/wasm/wasm-module-builder.js"); | 9 load("test/mjsunit/wasm/wasm-module-builder.js"); |
| 10 | 10 |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 kExprCallIndirect, sig_index, kTableZero | 138 kExprCallIndirect, sig_index, kTableZero |
| 139 ]) | 139 ]) |
| 140 .exportFunc() | 140 .exportFunc() |
| 141 builder.appendToTable([0]); | 141 builder.appendToTable([0]); |
| 142 | 142 |
| 143 try { | 143 try { |
| 144 builder.instantiate().exports.recursion(); | 144 builder.instantiate().exports.recursion(); |
| 145 fail("expected wasm exception"); | 145 fail("expected wasm exception"); |
| 146 } catch (e) { | 146 } catch (e) { |
| 147 assertEquals("Maximum call stack size exceeded", e.message, "trap reason"); | 147 assertEquals("Maximum call stack size exceeded", e.message, "trap reason"); |
| 148 assertTrue(e.stack.length >= 4, "expected at least 4 stack entries"); |
| 149 verifyStack(e.stack.splice(0, 4), [ |
| 150 // isWasm function line pos file |
| 151 [ true, "recursion", 0, 0, null], |
| 152 [ true, "recursion", 0, 3, null], |
| 153 [ true, "recursion", 0, 3, null], |
| 154 [ true, "recursion", 0, 3, null] |
| 155 ]); |
| 148 } | 156 } |
| 149 })(); | 157 })(); |
| OLD | NEW |