[njs] Added the "name" property to the Function prototype object.

Valentin Bartenev vbart at nginx.com
Sat May 4 14:16:16 UTC 2019


details:   https://hg.nginx.org/njs/rev/0c42e997371c
branches:  
changeset: 945:0c42e997371c
user:      Valentin Bartenev <vbart at nginx.com>
date:      Sat May 04 17:12:35 2019 +0300
description:
Added the "name" property to the Function prototype object.

Its value according to the ES6+ specification must be the empty String.

diffstat:

 njs/njs_function.c |  6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r b7cdfafdc20b -r 0c42e997371c njs/njs_function.c
--- a/njs/njs_function.c	Sat May 04 16:59:24 2019 +0300
+++ b/njs/njs_function.c	Sat May 04 17:12:35 2019 +0300
@@ -1175,6 +1175,12 @@ static const njs_object_prop_t  njs_func
 {
     {
         .type = NJS_PROPERTY,
+        .name = njs_string("name"),
+        .value = njs_string(""),
+    },
+
+    {
+        .type = NJS_PROPERTY,
         .name = njs_string("length"),
         .value = njs_value(NJS_NUMBER, 0, 0.0),
     },


More information about the nginx-devel mailing list