From 872a214f800982e1a9c38a24a7e524871f3553ff Mon Sep 17 00:00:00 2001 From: Jelle Raaijmakers Date: Tue, 26 Nov 2024 11:43:47 +0100 Subject: [PATCH] LibJS: Make FunctionPrototype's name empty per the spec --- Libraries/LibJS/Runtime/FunctionPrototype.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Libraries/LibJS/Runtime/FunctionPrototype.h b/Libraries/LibJS/Runtime/FunctionPrototype.h index c37d64dea39..597092965a7 100644 --- a/Libraries/LibJS/Runtime/FunctionPrototype.h +++ b/Libraries/LibJS/Runtime/FunctionPrototype.h @@ -30,9 +30,8 @@ private: JS_DECLARE_NATIVE_FUNCTION(to_string); JS_DECLARE_NATIVE_FUNCTION(symbol_has_instance); - // Totally unnecessary, but sadly still necessary. - // TODO: Get rid of the pointless name() method. - DeprecatedFlyString m_name { "FunctionPrototype" }; + // 20.2.3: The Function prototype object has a "name" property whose value is the empty String. + DeprecatedFlyString m_name; }; }