mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:28:12 +00:00
LibJS: Make Value::to_string_without_side_effects() infallible
Work towards #20449.
This commit is contained in:
parent
b8f78c0adc
commit
97ebfd9f0f
69 changed files with 182 additions and 182 deletions
|
@ -20,11 +20,11 @@ static ThrowCompletionOr<ProxyObject*> proxy_create(VM& vm, Value target, Value
|
|||
|
||||
// 1. If target is not an Object, throw a TypeError exception.
|
||||
if (!target.is_object())
|
||||
return vm.throw_completion<TypeError>(ErrorType::ProxyConstructorBadType, "target", TRY_OR_THROW_OOM(vm, target.to_string_without_side_effects()));
|
||||
return vm.throw_completion<TypeError>(ErrorType::ProxyConstructorBadType, "target", target.to_string_without_side_effects());
|
||||
|
||||
// 2. If handler is not an Object, throw a TypeError exception.
|
||||
if (!handler.is_object())
|
||||
return vm.throw_completion<TypeError>(ErrorType::ProxyConstructorBadType, "handler", TRY_OR_THROW_OOM(vm, handler.to_string_without_side_effects()));
|
||||
return vm.throw_completion<TypeError>(ErrorType::ProxyConstructorBadType, "handler", handler.to_string_without_side_effects());
|
||||
|
||||
// 3. Let P be MakeBasicObject(« [[ProxyHandler]], [[ProxyTarget]] »).
|
||||
// 4. Set P's essential internal methods, except for [[Call]] and [[Construct]], to the definitions specified in 10.5.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue