[njs] Uncommented a successful test of getOwnPropertyNames().

Valentin Bartenev vbart at nginx.com
Mon May 6 08:32:13 UTC 2019


details:   https://hg.nginx.org/njs/rev/274d33eeb57d
branches:  
changeset: 946:274d33eeb57d
user:      Valentin Bartenev <vbart at nginx.com>
date:      Mon May 06 00:27:22 2019 +0300
description:
Uncommented a successful test of getOwnPropertyNames().

It's actully passing after 1213e0a2b485 and d7a0eb59a7e7 changes.

diffstat:

 njs/njs_object.c         |  2 --
 njs/test/njs_unit_test.c |  2 --
 2 files changed, 0 insertions(+), 4 deletions(-)

diffs (26 lines):

diff -r 0c42e997371c -r 274d33eeb57d njs/njs_object.c
--- a/njs/njs_object.c	Sat May 04 17:12:35 2019 +0300
+++ b/njs/njs_object.c	Mon May 06 00:27:22 2019 +0300
@@ -442,8 +442,6 @@ njs_object_property_query(njs_vm_t *vm, 
     do {
         pq->prototype = proto;
 
-        /* TODO: length should be Own property */
-
         if (nxt_fast_path(!pq->own || proto == object)) {
             ret = nxt_lvlhsh_find(&proto->hash, &pq->lhq);
 
diff -r 0c42e997371c -r 274d33eeb57d njs/test/njs_unit_test.c
--- a/njs/test/njs_unit_test.c	Sat May 04 17:12:35 2019 +0300
+++ b/njs/test/njs_unit_test.c	Mon May 06 00:27:22 2019 +0300
@@ -9310,10 +9310,8 @@ static njs_unit_test_t  njs_test[] =
     { nxt_string("Object.getOwnPropertyNames(Array)"),
       nxt_string("name,length,prototype,isArray,of") },
 
-#if 0
     { nxt_string("Object.getOwnPropertyNames(Array.isArray)"),
       nxt_string("length") },
-#endif
 
     { nxt_string("Object.defineProperty(Object.freeze({}), 'b', {})"),
       nxt_string("TypeError: object is not extensible") },


More information about the nginx-devel mailing list