mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 20:28:11 +00:00
LibJS: Convert internal_get_prototype_of() to ThrowCompletionOr
This commit is contained in:
parent
c8bf7f9c41
commit
5148150e1c
14 changed files with 48 additions and 70 deletions
|
@ -1334,9 +1334,7 @@ Value ordinary_has_instance(GlobalObject& global_object, Value lhs, Value rhs)
|
|||
return {};
|
||||
}
|
||||
while (true) {
|
||||
lhs_object = lhs_object->internal_get_prototype_of();
|
||||
if (vm.exception())
|
||||
return {};
|
||||
lhs_object = TRY_OR_DISCARD(lhs_object->internal_get_prototype_of());
|
||||
if (!lhs_object)
|
||||
return Value(false);
|
||||
if (same_value(rhs_prototype, lhs_object))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue