diff options
author | Tim Schumacher <timschumi@gmx.de> | 2023-01-21 11:44:19 +0100 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2023-01-25 17:10:05 +0330 |
commit | 982ebbc304a8e2ed637009f9bcc4dac53b43e06c (patch) | |
tree | 5e671d853859510a19534cbfde184b6c683ba4b3 /Userland/Utilities/wasm.cpp | |
parent | 409fb0fe79071686590cfd1fdbc815193a15d795 (diff) | |
download | serenity-982ebbc304a8e2ed637009f9bcc4dac53b43e06c.zip |
LibWasm: Port the parser to `Core::Stream`
Diffstat (limited to 'Userland/Utilities/wasm.cpp')
-rw-r--r-- | Userland/Utilities/wasm.cpp | 4 |
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())); |