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

LibJS: Use ThrowCompletionOr in require_object_coercible()

This commit is contained in:
Linus Groh 2021-09-15 20:52:21 +01:00
parent 33679a8445
commit 568296d0cc
6 changed files with 22 additions and 57 deletions

View file

@ -786,9 +786,7 @@ Reference MemberExpression::to_reference(Interpreter& interpreter, GlobalObject&
// From here on equivalent to
// 13.3.4 EvaluatePropertyAccessWithIdentifierKey ( baseValue, identifierName, strict ), https://tc39.es/ecma262/#sec-evaluate-property-access-with-identifier-key
object_value = require_object_coercible(global_object, object_value);
if (interpreter.exception())
return {};
object_value = TRY_OR_DISCARD(require_object_coercible(global_object, object_value));
auto property_name = computed_property_name(interpreter, global_object);
if (!property_name.is_valid())