mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-31 14:48:17 +00:00
LibWeb: No longer return undefined
on null table entry in Wasm API
Return `null` instead, as per the specification.
This commit is contained in:
parent
93216a875e
commit
3c5e3eef10
Notes:
github-actions[bot]
2024-07-30 21:44:36 +00:00
Author: https://github.com/dzfrias
Commit: 3c5e3eef10
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/909
Reviewed-by: https://github.com/alimpfard
2 changed files with 4 additions and 3 deletions
|
@ -106,8 +106,6 @@ WebIDL::ExceptionOr<JS::Value> Table::get(u32 index) const
|
|||
return vm.throw_completion<JS::RangeError>("Table element index out of range"sv);
|
||||
|
||||
auto& ref = table->elements()[index];
|
||||
if (!ref.ref().has<Wasm::Reference::Null>())
|
||||
return JS::js_undefined();
|
||||
|
||||
Wasm::Value wasm_value { ref };
|
||||
return Detail::to_js_value(vm, wasm_value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue