]> git.kaiwu.me - njs.git/commitdiff
Uncommented a successful test of getOwnPropertyNames().
authorValentin Bartenev <vbart@nginx.com>
Sun, 5 May 2019 21:27:22 +0000 (00:27 +0300)
committerValentin Bartenev <vbart@nginx.com>
Sun, 5 May 2019 21:27:22 +0000 (00:27 +0300)
It's actully passing after 1213e0a2b485 and d7a0eb59a7e7 changes.

njs/njs_object.c
njs/test/njs_unit_test.c

index 5f6822e9fb6a423e13849cd648853a22d26a6102..fb94be5bc8dfbcfca4a7aa1388bd6c7173830b5c 100644 (file)
@@ -442,8 +442,6 @@ njs_object_property_query(njs_vm_t *vm, njs_property_query_t *pq,
     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);
 
index c4f892793105431ab6c0e53401d0d10bdc8fb8d9..e9d46ebab7733f470fef061881b4cfc44879730f 100644 (file)
@@ -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") },