summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/MapConstructor.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/MapConstructor.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/MapConstructor.cpp')
-rw-r--r--Userland/Libraries/LibJS/Runtime/MapConstructor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/MapConstructor.cpp b/Userland/Libraries/LibJS/Runtime/MapConstructor.cpp
index eceff0913f..2434a87ec1 100644
--- a/Userland/Libraries/LibJS/Runtime/MapConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/MapConstructor.cpp
@@ -14,7 +14,7 @@
namespace JS {
MapConstructor::MapConstructor(GlobalObject& global_object)
- : NativeFunction(vm().names.Map, *global_object.function_prototype())
+ : NativeFunction(vm().names.Map.as_string(), *global_object.function_prototype())
{
}