mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 12:07:14 +02: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:
committed by
Linus Groh
parent
16eb0803fc
commit
581f20e6f2
Notes:
sideshowbarker
2024-07-18 11:25:43 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/581f20e6f24 Pull-request: https://github.com/SerenityOS/serenity/pull/8280
@@ -13,7 +13,7 @@
|
||||
namespace JS {
|
||||
|
||||
ArrayBufferConstructor::ArrayBufferConstructor(GlobalObject& global_object)
|
||||
: NativeFunction(vm().names.ArrayBuffer, *global_object.function_prototype())
|
||||
: NativeFunction(vm().names.ArrayBuffer.as_string(), *global_object.function_prototype())
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user