mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 08:28:11 +00:00
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.
This commit is contained in:
parent
16eb0803fc
commit
581f20e6f2
24 changed files with 28 additions and 28 deletions
|
@ -11,7 +11,7 @@
|
|||
namespace JS {
|
||||
|
||||
SymbolConstructor::SymbolConstructor(GlobalObject& global_object)
|
||||
: NativeFunction(vm().names.Symbol, *global_object.function_prototype())
|
||||
: NativeFunction(vm().names.Symbol.as_string(), *global_object.function_prototype())
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue