mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 13:02:09 +02:00
AK: Remove the fallible constructor from FixedMemoryStream
This commit is contained in:
committed by
Linus Groh
parent
8b2f23d016
commit
220fbcaa7e
Notes:
sideshowbarker
2024-07-17 08:55:54 +09:00
Author: https://github.com/timschumi Commit: https://github.com/SerenityOS/serenity/commit/220fbcaa7e Pull-request: https://github.com/SerenityOS/serenity/pull/17264
@@ -121,8 +121,8 @@ JS::ThrowCompletionOr<size_t> parse_module(JS::VM& vm, JS::Object* buffer_object
|
||||
} else {
|
||||
return vm.throw_completion<JS::TypeError>("Not a BufferSource");
|
||||
}
|
||||
auto stream = FixedMemoryStream::construct(data).release_value_but_fixme_should_propagate_errors();
|
||||
auto module_result = Wasm::Module::parse(*stream);
|
||||
FixedMemoryStream stream { data };
|
||||
auto module_result = Wasm::Module::parse(stream);
|
||||
if (module_result.is_error()) {
|
||||
// FIXME: Throw CompileError instead.
|
||||
return vm.throw_completion<JS::TypeError>(Wasm::parse_error_to_deprecated_string(module_result.error()));
|
||||
|
||||
Reference in New Issue
Block a user