mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:27:44 +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
|
@ -45,7 +45,7 @@ ThrowCompletionOr<NonnullGCPtr<Object>> WeakRefConstructor::construct(FunctionOb
|
|||
|
||||
// 2. If CanBeHeldWeakly(target) is false, throw a TypeError exception.
|
||||
if (!can_be_held_weakly(target))
|
||||
return vm.throw_completion<TypeError>(ErrorType::CannotBeHeldWeakly, TRY_OR_THROW_OOM(vm, target.to_string_without_side_effects()));
|
||||
return vm.throw_completion<TypeError>(ErrorType::CannotBeHeldWeakly, target.to_string_without_side_effects());
|
||||
|
||||
// 3. Let weakRef be ? OrdinaryCreateFromConstructor(NewTarget, "%WeakRef.prototype%", « [[WeakRefTarget]] »).
|
||||
// 4. Perform AddToKeptObjects(target).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue