summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/ReflectObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/ReflectObject.cpp')
-rw-r--r--Userland/Libraries/LibJS/Runtime/ReflectObject.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/ReflectObject.cpp b/Userland/Libraries/LibJS/Runtime/ReflectObject.cpp
index 9f4a1044c9..d6e68a3161 100644
--- a/Userland/Libraries/LibJS/Runtime/ReflectObject.cpp
+++ b/Userland/Libraries/LibJS/Runtime/ReflectObject.cpp
@@ -54,7 +54,7 @@ JS_DEFINE_NATIVE_FUNCTION(ReflectObject::apply)
// 1. If IsCallable(target) is false, throw a TypeError exception.
if (!target.is_function())
- return vm.throw_completion<TypeError>(ErrorType::NotAFunction, target.to_string_without_side_effects());
+ return vm.throw_completion<TypeError>(ErrorType::NotAFunction, target.to_deprecated_string_without_side_effects());
// 2. Let args be ? CreateListFromArrayLike(argumentsList).
auto args = TRY(create_list_from_array_like(vm, arguments_list));
@@ -73,14 +73,14 @@ JS_DEFINE_NATIVE_FUNCTION(ReflectObject::construct)
// 1. If IsConstructor(target) is false, throw a TypeError exception.
if (!target.is_constructor())
- return vm.throw_completion<TypeError>(ErrorType::NotAConstructor, target.to_string_without_side_effects());
+ return vm.throw_completion<TypeError>(ErrorType::NotAConstructor, target.to_deprecated_string_without_side_effects());
// 2. If newTarget is not present, set newTarget to target.
if (vm.argument_count() < 3)
new_target = target;
// 3. Else if IsConstructor(newTarget) is false, throw a TypeError exception.
else if (!new_target.is_constructor())
- return vm.throw_completion<TypeError>(ErrorType::NotAConstructor, new_target.to_string_without_side_effects());
+ return vm.throw_completion<TypeError>(ErrorType::NotAConstructor, new_target.to_deprecated_string_without_side_effects());
// 4. Let args be ? CreateListFromArrayLike(argumentsList).
auto args = TRY(create_list_from_array_like(vm, arguments_list));
@@ -98,7 +98,7 @@ JS_DEFINE_NATIVE_FUNCTION(ReflectObject::define_property)
// 1. If Type(target) is not Object, throw a TypeError exception.
if (!target.is_object())
- return vm.throw_completion<TypeError>(ErrorType::NotAnObject, target.to_string_without_side_effects());
+ return vm.throw_completion<TypeError>(ErrorType::NotAnObject, target.to_deprecated_string_without_side_effects());
// 2. Let key be ? ToPropertyKey(propertyKey).
auto key = TRY(property_key.to_property_key(vm));
@@ -118,7 +118,7 @@ JS_DEFINE_NATIVE_FUNCTION(ReflectObject::delete_property)
// 1. If Type(target) is not Object, throw a TypeError exception.
if (!target.is_object())
- return vm.throw_completion<TypeError>(ErrorType::NotAnObject, target.to_string_without_side_effects());
+ return vm.throw_completion<TypeError>(ErrorType::NotAnObject, target.to_deprecated_string_without_side_effects());
// 2. Let key be ? ToPropertyKey(propertyKey).
auto key = TRY(property_key.to_property_key(vm));
@@ -136,7 +136,7 @@ JS_DEFINE_NATIVE_FUNCTION(ReflectObject::get)
// 1. If Type(target) is not Object, throw a TypeError exception.
if (!target.is_object())
- return vm.throw_completion<TypeError>(ErrorType::NotAnObject, target.to_string_without_side_effects());
+ return vm.throw_completion<TypeError>(ErrorType::NotAnObject, target.to_deprecated_string_without_side_effects());
// 2. Let key be ? ToPropertyKey(propertyKey).
auto key = TRY(property_key.to_property_key(vm));
@@ -159,7 +159,7 @@ JS_DEFINE_NATIVE_FUNCTION(ReflectObject::get_own_property_descriptor)
// 1. If Type(target) is not Object, throw a TypeError exception.
if (!target.is_object())
- return vm.throw_completion<TypeError>(ErrorType::NotAnObject, target.to_string_without_side_effects());
+ return vm.throw_completion<TypeError>(ErrorType::NotAnObject, target.to_deprecated_string_without_side_effects());
// 2. Let key be ? ToPropertyKey(propertyKey).
auto key = TRY(property_key.to_property_key(vm));
@@ -178,7 +178,7 @@ JS_DEFINE_NATIVE_FUNCTION(ReflectObject::get_prototype_of)
// 1. If Type(target) is not Object, throw a TypeError exception.
if (!target.is_object())
- return vm.throw_completion<TypeError>(ErrorType::NotAnObject, target.to_string_without_side_effects());
+ return vm.throw_completion<TypeError>(ErrorType::NotAnObject, target.to_deprecated_string_without_side_effects());
// 2. Return ? target.[[GetPrototypeOf]]().
return TRY(target.as_object().internal_get_prototype_of());
@@ -192,7 +192,7 @@ JS_DEFINE_NATIVE_FUNCTION(ReflectObject::has)
// 1. If Type(target) is not Object, throw a TypeError exception.
if (!target.is_object())
- return vm.throw_completion<TypeError>(ErrorType::NotAnObject, target.to_string_without_side_effects());
+ return vm.throw_completion<TypeError>(ErrorType::NotAnObject, target.to_deprecated_string_without_side_effects());
// 2. Let key be ? ToPropertyKey(propertyKey).
auto key = TRY(property_key.to_property_key(vm));
@@ -208,7 +208,7 @@ JS_DEFINE_NATIVE_FUNCTION(ReflectObject::is_extensible)
// 1. If Type(target) is not Object, throw a TypeError exception.
if (!target.is_object())
- return vm.throw_completion<TypeError>(ErrorType::NotAnObject, target.to_string_without_side_effects());
+ return vm.throw_completion<TypeError>(ErrorType::NotAnObject, target.to_deprecated_string_without_side_effects());
// 2. Return ? target.[[IsExtensible]]().
return Value(TRY(target.as_object().internal_is_extensible()));
@@ -223,7 +223,7 @@ JS_DEFINE_NATIVE_FUNCTION(ReflectObject::own_keys)
// 1. If Type(target) is not Object, throw a TypeError exception.
if (!target.is_object())
- return vm.throw_completion<TypeError>(ErrorType::NotAnObject, target.to_string_without_side_effects());
+ return vm.throw_completion<TypeError>(ErrorType::NotAnObject, target.to_deprecated_string_without_side_effects());
// 2. Let keys be ? target.[[OwnPropertyKeys]]().
auto keys = TRY(target.as_object().internal_own_property_keys());
@@ -239,7 +239,7 @@ JS_DEFINE_NATIVE_FUNCTION(ReflectObject::prevent_extensions)
// 1. If Type(target) is not Object, throw a TypeError exception.
if (!target.is_object())
- return vm.throw_completion<TypeError>(ErrorType::NotAnObject, target.to_string_without_side_effects());
+ return vm.throw_completion<TypeError>(ErrorType::NotAnObject, target.to_deprecated_string_without_side_effects());
// 2. Return ? target.[[PreventExtensions]]().
return Value(TRY(target.as_object().internal_prevent_extensions()));
@@ -255,7 +255,7 @@ JS_DEFINE_NATIVE_FUNCTION(ReflectObject::set)
// 1. If Type(target) is not Object, throw a TypeError exception.
if (!target.is_object())
- return vm.throw_completion<TypeError>(ErrorType::NotAnObject, target.to_string_without_side_effects());
+ return vm.throw_completion<TypeError>(ErrorType::NotAnObject, target.to_deprecated_string_without_side_effects());
// 2. Let key be ? ToPropertyKey(propertyKey).
auto key = TRY(property_key.to_property_key(vm));
@@ -278,7 +278,7 @@ JS_DEFINE_NATIVE_FUNCTION(ReflectObject::set_prototype_of)
// 1. If Type(target) is not Object, throw a TypeError exception.
if (!target.is_object())
- return vm.throw_completion<TypeError>(ErrorType::NotAnObject, target.to_string_without_side_effects());
+ return vm.throw_completion<TypeError>(ErrorType::NotAnObject, target.to_deprecated_string_without_side_effects());
// 2. If Type(proto) is not Object and proto is not null, throw a TypeError exception.
if (!proto.is_object() && !proto.is_null())