mirror of
https://github.com/RGBCube/serenity
synced 2025-06-28 21:22:08 +00:00
LibJS: Convert define_property_or_throw() to ThrowCompletionOr
This commit is contained in:
parent
ebf57df431
commit
fe86b04b42
12 changed files with 31 additions and 58 deletions
|
@ -341,9 +341,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::define_property)
|
|||
auto descriptor = to_property_descriptor(global_object, vm.argument(2));
|
||||
if (vm.exception())
|
||||
return {};
|
||||
vm.argument(0).as_object().define_property_or_throw(key, descriptor);
|
||||
if (vm.exception())
|
||||
return {};
|
||||
TRY_OR_DISCARD(vm.argument(0).as_object().define_property_or_throw(key, descriptor));
|
||||
return vm.argument(0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue