mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 06:09:08 +00:00
AK: Remove the fallible constructor from FixedMemoryStream
This commit is contained in:
parent
8b2f23d016
commit
220fbcaa7e
Notes:
sideshowbarker
2024-07-17 08:55:54 +09:00
Author: https://github.com/timschumi
Commit: 220fbcaa7e
Pull-request: https://github.com/SerenityOS/serenity/pull/17264
31 changed files with 185 additions and 209 deletions
|
@ -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()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue