diff options
Diffstat (limited to 'Tests/LibWasm/test-wasm.cpp')
-rw-r--r-- | Tests/LibWasm/test-wasm.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Tests/LibWasm/test-wasm.cpp b/Tests/LibWasm/test-wasm.cpp index 233f9f90f5..c882b95a3f 100644 --- a/Tests/LibWasm/test-wasm.cpp +++ b/Tests/LibWasm/test-wasm.cpp @@ -246,6 +246,9 @@ JS_DEFINE_NATIVE_FUNCTION(WebAssemblyModule::wasm_invoke) if (result.is_trap()) return vm.throw_completion<JS::TypeError>(TRY_OR_THROW_OOM(vm, String::formatted("Execution trapped: {}", result.trap().reason))); + if (result.is_completion()) + return result.completion(); + if (result.values().is_empty()) return JS::js_null(); |