1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:57:43 +00:00

LibJS: Convert is_extensible() to ThrowCompletionOr

This commit is contained in:
Linus Groh 2021-10-02 15:27:37 +01:00
parent fa2ac5b759
commit 9b6c09e2c4
5 changed files with 22 additions and 48 deletions

View file

@ -179,7 +179,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::is_extensible)
auto argument = vm.argument(0);
if (!argument.is_object())
return Value(false);
return Value(argument.as_object().is_extensible());
return Value(TRY_OR_DISCARD(argument.as_object().is_extensible()));
}
// 20.1.2.15 Object.isFrozen ( O ), https://tc39.es/ecma262/#sec-object.isfrozen