summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/FinalizationRegistryConstructor.cpp
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2021-06-28 03:45:49 +0300
committerLinus Groh <mail@linusgroh.de>2021-06-28 08:55:14 +0100
commit581f20e6f2425e1bdbee04218f6bfa1b859f0ed2 (patch)
tree3678fb22be5d98b0aec7f49e0956430f2d7b0587 /Userland/Libraries/LibJS/Runtime/FinalizationRegistryConstructor.cpp
parent16eb0803fcc2c1b2235472a64b42fd2b9870a169 (diff)
downloadserenity-581f20e6f2425e1bdbee04218f6bfa1b859f0ed2.zip
LibJS: Accept FlyStrings in the NativeFunction constructors
This makes the implicit run-time assertion in PropertyName::to_string() into an explicit compile-time requirement, removes a wasteful FlyString -> PropertyName -> FlyString construction from NativeFunction::create() and allows setting the function name to a null string for anonymous native functions.
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/FinalizationRegistryConstructor.cpp')
-rw-r--r--Userland/Libraries/LibJS/Runtime/FinalizationRegistryConstructor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/FinalizationRegistryConstructor.cpp b/Userland/Libraries/LibJS/Runtime/FinalizationRegistryConstructor.cpp
index d15402f36f..e37ca80d64 100644
--- a/Userland/Libraries/LibJS/Runtime/FinalizationRegistryConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/FinalizationRegistryConstructor.cpp
@@ -13,7 +13,7 @@
namespace JS {
FinalizationRegistryConstructor::FinalizationRegistryConstructor(GlobalObject& global_object)
- : NativeFunction(vm().names.FinalizationRegistry, *global_object.function_prototype())
+ : NativeFunction(vm().names.FinalizationRegistry.as_string(), *global_object.function_prototype())
{
}