From: Valentin Bartenev Date: Sun, 5 May 2019 21:27:22 +0000 (+0300) Subject: Uncommented a successful test of getOwnPropertyNames(). X-Git-Tag: 0.3.2~27 X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/static/gitweb.js?a=commitdiff_plain;h=9955098c72ded53e14de3f4c0958e5a2f4537b48;p=njs.git Uncommented a successful test of getOwnPropertyNames(). It's actully passing after 1213e0a2b485 and d7a0eb59a7e7 changes. --- diff --git a/njs/njs_object.c b/njs/njs_object.c index 5f6822e9..fb94be5b 100644 --- a/njs/njs_object.c +++ b/njs/njs_object.c @@ -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); diff --git a/njs/test/njs_unit_test.c b/njs/test/njs_unit_test.c index c4f89279..e9d46eba 100644 --- a/njs/test/njs_unit_test.c +++ b/njs/test/njs_unit_test.c @@ -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") },