mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:17:45 +00:00
LibJS+Everywhere: Deprecate Value::to_string_without_side_effects
This commit is contained in:
parent
7fc7d4f8c6
commit
b245300ba1
65 changed files with 168 additions and 168 deletions
|
@ -48,14 +48,14 @@ ThrowCompletionOr<Iterator> get_iterator(VM& vm, Value value, IteratorHint hint,
|
|||
|
||||
// NOTE: Additional type check to produce a better error message than Call().
|
||||
if (!method->is_function())
|
||||
return vm.throw_completion<TypeError>(ErrorType::NotIterable, value.to_string_without_side_effects());
|
||||
return vm.throw_completion<TypeError>(ErrorType::NotIterable, value.to_deprecated_string_without_side_effects());
|
||||
|
||||
// 3. Let iterator be ? Call(method, obj).
|
||||
auto iterator = TRY(call(vm, *method, value));
|
||||
|
||||
// 4. If Type(iterator) is not Object, throw a TypeError exception.
|
||||
if (!iterator.is_object())
|
||||
return vm.throw_completion<TypeError>(ErrorType::NotIterable, value.to_string_without_side_effects());
|
||||
return vm.throw_completion<TypeError>(ErrorType::NotIterable, value.to_deprecated_string_without_side_effects());
|
||||
|
||||
// 5. Let nextMethod be ? GetV(iterator, "next").
|
||||
auto next_method = TRY(iterator.get(vm, vm.names.next));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue