mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:07: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
|
@ -62,7 +62,7 @@ ThrowCompletionOr<NonnullGCPtr<Object>> WeakMapConstructor::construct(FunctionOb
|
|||
// 7. Return ? AddEntriesFromIterable(map, iterable, adder).
|
||||
(void)TRY(get_iterator_values(vm, iterable, [&](Value iterator_value) -> Optional<Completion> {
|
||||
if (!iterator_value.is_object())
|
||||
return vm.throw_completion<TypeError>(ErrorType::NotAnObject, DeprecatedString::formatted("Iterator value {}", TRY_OR_THROW_OOM(vm, iterator_value.to_string_without_side_effects())));
|
||||
return vm.throw_completion<TypeError>(ErrorType::NotAnObject, DeprecatedString::formatted("Iterator value {}", iterator_value.to_string_without_side_effects()));
|
||||
|
||||
auto key = TRY(iterator_value.as_object().get(0));
|
||||
auto value = TRY(iterator_value.as_object().get(1));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue