mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:17:35 +00:00
LibJS: Convert internal_set_prototype_of() to ThrowCompletionOr
This commit is contained in:
parent
5148150e1c
commit
8c81c84c18
20 changed files with 43 additions and 50 deletions
|
@ -537,11 +537,8 @@ Value VM::construct(FunctionObject& function, FunctionObject& new_target, Option
|
|||
auto prototype = new_target.get(names.prototype);
|
||||
if (exception())
|
||||
return {};
|
||||
if (prototype.is_object()) {
|
||||
result.as_object().internal_set_prototype_of(&prototype.as_object());
|
||||
if (exception())
|
||||
return {};
|
||||
}
|
||||
if (prototype.is_object())
|
||||
TRY_OR_DISCARD(result.as_object().internal_set_prototype_of(&prototype.as_object()));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue