Преглед изворни кода

LibJS: Make FunctionPrototype's name empty per the spec

Jelle Raaijmakers пре 7 месеци
родитељ
комит
872a214f80
1 измењених фајлова са 2 додато и 3 уклоњено
  1. 2 3
      Libraries/LibJS/Runtime/FunctionPrototype.h

+ 2 - 3
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;
 };
 
 }