mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:48:11 +00:00
LibJS: Convert to_object() to ThrowCompletionOr
This commit is contained in:
parent
9eb065a1f6
commit
52976bfac6
45 changed files with 239 additions and 490 deletions
|
@ -32,10 +32,7 @@ JS::Value WebAssemblyMemoryConstructor::construct(FunctionObject&)
|
|||
auto& vm = this->vm();
|
||||
auto& global_object = this->global_object();
|
||||
|
||||
auto descriptor = vm.argument(0).to_object(global_object);
|
||||
if (vm.exception())
|
||||
return {};
|
||||
|
||||
auto descriptor = TRY_OR_DISCARD(vm.argument(0).to_object(global_object));
|
||||
auto initial_value = TRY_OR_DISCARD(descriptor->get("initial"));
|
||||
auto maximum_value = TRY_OR_DISCARD(descriptor->get("maximum"));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue