diff --git a/Tests/LibWasm/test-wasm.cpp b/Tests/LibWasm/test-wasm.cpp index 838790bdd3..2a8a44ecc5 100644 --- a/Tests/LibWasm/test-wasm.cpp +++ b/Tests/LibWasm/test-wasm.cpp @@ -104,6 +104,11 @@ TESTJS_GLOBAL_FUNCTION(parse_webassembly_module, parseWebAssemblyModule) } auto& array = static_cast(*object); InputMemoryStream stream { array.data() }; + ScopeGuard handle_stream_error { + [&] { + stream.handle_any_error(); + } + }; auto result = Wasm::Module::parse(stream); if (result.is_error()) { vm.throw_exception(global_object, Wasm::parse_error_to_string(result.error()));