Welcome! Log In Create A New Profile

Advanced

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

Valentin Bartenev
May 06, 2019 04:34AM
details: https://hg.nginx.org/njs/rev/274d33eeb57d
branches:
changeset: 946:274d33eeb57d
user: Valentin Bartenev <vbart@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") },
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

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

Valentin Bartenev 266 May 06, 2019 04:34AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 183
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready