]> git.kaiwu.me - njs.git/commitdiff
Added the "name" property to the Function prototype object.
authorValentin Bartenev <vbart@nginx.com>
Sat, 4 May 2019 14:12:35 +0000 (17:12 +0300)
committerValentin Bartenev <vbart@nginx.com>
Sat, 4 May 2019 14:12:35 +0000 (17:12 +0300)
Its value according to the ES6+ specification must be the empty String.

njs/njs_function.c

index 41e9dbff66aca0d7d56117b2eeee6141b0627a47..821e207bda6da603131ab23960197d6de613db63 100644 (file)
@@ -1173,6 +1173,12 @@ njs_function_prototype_bind(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs,
 
 static const njs_object_prop_t  njs_function_prototype_properties[] =
 {
+    {
+        .type = NJS_PROPERTY,
+        .name = njs_string("name"),
+        .value = njs_string(""),
+    },
+
     {
         .type = NJS_PROPERTY,
         .name = njs_string("length"),