summaryrefslogtreecommitdiff
path: root/Userland/Utilities/wasm.cpp
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2023-01-21 11:44:19 +0100
committerAli Mohammad Pur <Ali.mpfard@gmail.com>2023-01-25 17:10:05 +0330
commit982ebbc304a8e2ed637009f9bcc4dac53b43e06c (patch)
tree5e671d853859510a19534cbfde184b6c683ba4b3 /Userland/Utilities/wasm.cpp
parent409fb0fe79071686590cfd1fdbc815193a15d795 (diff)
downloadserenity-982ebbc304a8e2ed637009f9bcc4dac53b43e06c.zip
LibWasm: Port the parser to `Core::Stream`
Diffstat (limited to 'Userland/Utilities/wasm.cpp')
-rw-r--r--Userland/Utilities/wasm.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Utilities/wasm.cpp b/Userland/Utilities/wasm.cpp
index 0d21b98bfc..66146bc45b 100644
--- a/Userland/Utilities/wasm.cpp
+++ b/Userland/Utilities/wasm.cpp
@@ -252,8 +252,8 @@ static Optional<Wasm::Module> parse(StringView filename)
return {};
}
- InputMemoryStream stream { ReadonlyBytes { result.value()->data(), result.value()->size() } };
- auto parse_result = Wasm::Module::parse(stream);
+ auto stream = Core::Stream::FixedMemoryStream::construct(ReadonlyBytes { result.value()->data(), result.value()->size() }).release_value_but_fixme_should_propagate_errors();
+ auto parse_result = Wasm::Module::parse(*stream);
if (parse_result.is_error()) {
warnln("Something went wrong, either the file is invalid, or there's a bug with LibWasm!");
warnln("The parse error was {}", Wasm::parse_error_to_deprecated_string(parse_result.error()));