summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-02-01 09:54:29 +0100
committerAndreas Kling <kling@serenityos.org>2021-02-01 10:34:45 +0100
commitc41d340983b803c1c12a58ac7884b243906bda36 (patch)
tree543111c146f7e2e9dccb09a2494af5105ad0daec /Userland/Libraries/LibJS
parent52fff644d5b2f93a7e6f05b002f1af605c142cd5 (diff)
downloadserenity-c41d340983b803c1c12a58ac7884b243906bda36.zip
LibJS: Use VM::names for Object::invoke() function names
Diffstat (limited to 'Userland/Libraries/LibJS')
-rw-r--r--Userland/Libraries/LibJS/Runtime/ArrayPrototype.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/ObjectPrototype.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/ArrayPrototype.cpp b/Userland/Libraries/LibJS/Runtime/ArrayPrototype.cpp
index 8b155e9a95..aa6e39a6e8 100644
--- a/Userland/Libraries/LibJS/Runtime/ArrayPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/ArrayPrototype.cpp
@@ -309,7 +309,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::to_locale_string)
auto* value_object = value.to_object(global_object);
if (!value_object)
return {};
- auto locale_string_result = value_object->invoke("toLocaleString");
+ auto locale_string_result = value_object->invoke(vm.names.toLocaleString);
if (vm.exception())
return {};
auto string = locale_string_result.to_string(global_object);
diff --git a/Userland/Libraries/LibJS/Runtime/ObjectPrototype.cpp b/Userland/Libraries/LibJS/Runtime/ObjectPrototype.cpp
index cfc31c6b91..71f498e126 100644
--- a/Userland/Libraries/LibJS/Runtime/ObjectPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/ObjectPrototype.cpp
@@ -119,7 +119,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectPrototype::to_locale_string)
auto* this_object = vm.this_value(global_object).to_object(global_object);
if (!this_object)
return {};
- return this_object->invoke("toString");
+ return this_object->invoke(vm.names.toString);
}
JS_DEFINE_NATIVE_FUNCTION(ObjectPrototype::value_of)