mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 19:59:17 +00:00
LibWasm: Port the parser to Core::Stream
This commit is contained in:
committed by
Ali Mohammad Pur
parent
409fb0fe79
commit
982ebbc304
@@ -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()));
|
||||
|
||||
Reference in New Issue
Block a user