summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2023-02-12 20:38:28 -0500
committerLinus Groh <mail@linusgroh.de>2023-02-16 14:32:22 +0100
commitb245300ba132ea3bce21c82ea585ce8ea85cca40 (patch)
tree3fc95ce9b306dac23d3486eeabc60bb9a53c57cc /Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp
parent7fc7d4f8c642d776488a52758e428b33fd8e6693 (diff)
downloadserenity-b245300ba132ea3bce21c82ea585ce8ea85cca40.zip
LibJS+Everywhere: Deprecate Value::to_string_without_side_effects
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp')
-rw-r--r--Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp b/Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp
index 5005043989..fa0f5129d5 100644
--- a/Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp
+++ b/Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp
@@ -39,7 +39,7 @@ namespace JS {
ThrowCompletionOr<Value> require_object_coercible(VM& vm, Value value)
{
if (value.is_nullish())
- return vm.throw_completion<TypeError>(ErrorType::NotObjectCoercible, value.to_string_without_side_effects());
+ return vm.throw_completion<TypeError>(ErrorType::NotObjectCoercible, value.to_deprecated_string_without_side_effects());
return value;
}
@@ -52,7 +52,7 @@ ThrowCompletionOr<Value> call_impl(VM& vm, Value function, Value this_value, Opt
// 2. If IsCallable(F) is false, throw a TypeError exception.
if (!function.is_function())
- return vm.throw_completion<TypeError>(ErrorType::NotAFunction, function.to_string_without_side_effects());
+ return vm.throw_completion<TypeError>(ErrorType::NotAFunction, function.to_deprecated_string_without_side_effects());
// 3. Return ? F.[[Call]](V, argumentsList).
return function.as_function().internal_call(this_value, move(*arguments_list));
@@ -100,7 +100,7 @@ ThrowCompletionOr<MarkedVector<Value>> create_list_from_array_like(VM& vm, Value
// 2. If Type(obj) is not Object, throw a TypeError exception.
if (!value.is_object())
- return vm.throw_completion<TypeError>(ErrorType::NotAnObject, value.to_string_without_side_effects());
+ return vm.throw_completion<TypeError>(ErrorType::NotAnObject, value.to_deprecated_string_without_side_effects());
auto& array_like = value.as_object();
@@ -144,7 +144,7 @@ ThrowCompletionOr<FunctionObject*> species_constructor(VM& vm, Object const& obj
// 3. If Type(C) is not Object, throw a TypeError exception.
if (!constructor.is_object())
- return vm.throw_completion<TypeError>(ErrorType::NotAConstructor, constructor.to_string_without_side_effects());
+ return vm.throw_completion<TypeError>(ErrorType::NotAConstructor, constructor.to_deprecated_string_without_side_effects());
// 4. Let S be ? Get(C, @@species).
auto species = TRY(constructor.as_object().get(*vm.well_known_symbol_species()));
@@ -158,7 +158,7 @@ ThrowCompletionOr<FunctionObject*> species_constructor(VM& vm, Object const& obj
return &species.as_function();
// 7. Throw a TypeError exception.
- return vm.throw_completion<TypeError>(ErrorType::NotAConstructor, species.to_string_without_side_effects());
+ return vm.throw_completion<TypeError>(ErrorType::NotAConstructor, species.to_deprecated_string_without_side_effects());
}
// 7.3.25 GetFunctionRealm ( obj ), https://tc39.es/ecma262/#sec-getfunctionrealm
@@ -1223,7 +1223,7 @@ CanonicalIndex canonical_numeric_index_string(PropertyKey const& property_key, C
// FIXME: We return 0 instead of n but it might not observable?
// 3. If SameValue(! ToString(n), argument) is true, return n.
- if (double_value.to_string_without_side_effects() == argument)
+ if (double_value.to_deprecated_string_without_side_effects() == argument)
return CanonicalIndex(CanonicalIndex::Type::Numeric, 0);
// 4. Return undefined.
@@ -1333,7 +1333,7 @@ ThrowCompletionOr<void> add_disposable_resource(VM& vm, Vector<DisposableResourc
// b. If Type(V) is not Object, throw a TypeError exception.
if (!value.is_object())
- return vm.throw_completion<TypeError>(ErrorType::NotAnObject, value.to_string_without_side_effects());
+ return vm.throw_completion<TypeError>(ErrorType::NotAnObject, value.to_deprecated_string_without_side_effects());
// c. Let resource be ? CreateDisposableResource(V, hint).
resource = TRY(create_disposable_resource(vm, value, hint));
@@ -1349,7 +1349,7 @@ ThrowCompletionOr<void> add_disposable_resource(VM& vm, Vector<DisposableResourc
else {
// i. If Type(V) is not Object, throw a TypeError exception.
if (!value.is_object())
- return vm.throw_completion<TypeError>(ErrorType::NotAnObject, value.to_string_without_side_effects());
+ return vm.throw_completion<TypeError>(ErrorType::NotAnObject, value.to_deprecated_string_without_side_effects());
// ii. Let resource be ? CreateDisposableResource(V, hint, method).
resource = TRY(create_disposable_resource(vm, value, hint, method));
@@ -1378,7 +1378,7 @@ ThrowCompletionOr<DisposableResource> create_disposable_resource(VM& vm, Value v
// c. If method is undefined, throw a TypeError exception.
if (!method)
- return vm.throw_completion<TypeError>(ErrorType::NoDisposeMethod, value.to_string_without_side_effects());
+ return vm.throw_completion<TypeError>(ErrorType::NoDisposeMethod, value.to_deprecated_string_without_side_effects());
}
// 2. Else,
// a. If IsCallable(method) is false, throw a TypeError exception.