mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 22:48:11 +00:00
Everywhere: Remove unintentional partial stream reads and writes
This commit is contained in:
parent
26516ee160
commit
ae51c1821c
44 changed files with 109 additions and 192 deletions
|
@ -32,8 +32,7 @@ TESTJS_GLOBAL_FUNCTION(read_binary_wasm_file, readBinaryWasmFile)
|
|||
|
||||
auto array = TRY(JS::Uint8Array::create(realm, file_size.value()));
|
||||
|
||||
// FIXME: This should read the entire span.
|
||||
auto read = file.value()->read_some(array->data());
|
||||
auto read = file.value()->read_until_filled(array->data());
|
||||
if (read.is_error())
|
||||
return vm.throw_completion<JS::TypeError>(error_code_to_string(read.error().code()));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue