details: http://hg.nginx.org/njs/rev/63d7430291f2 branches: changeset: 381:63d7430291f2 user: Andrey Zelenkov <zelen...@nginx.com> date: Tue Jun 27 17:03:16 2017 +0300 description: Fixed Object.isSealed() method.
diffstat: njs/njs_object.c | 2 +- njs/test/njs_unit_test.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diffs (36 lines): diff -r a0285736926b -r 63d7430291f2 njs/njs_object.c --- a/njs/njs_object.c Tue Jun 27 14:19:20 2017 +0300 +++ b/njs/njs_object.c Tue Jun 27 17:03:16 2017 +0300 @@ -872,7 +872,7 @@ njs_object_is_sealed(njs_vm_t *vm, njs_v break; } - if (prop->writable) { + if (prop->configurable) { goto done; } } diff -r a0285736926b -r 63d7430291f2 njs/test/njs_unit_test.c --- a/njs/test/njs_unit_test.c Tue Jun 27 14:19:20 2017 +0300 +++ b/njs/test/njs_unit_test.c Tue Jun 27 17:03:16 2017 +0300 @@ -6280,17 +6280,17 @@ static njs_unit_test_t njs_test[] = { nxt_string("var o = Object.defineProperties({}, {a:{}, b:{writable:1}});" "o = Object.preventExtensions(o);" "Object.isSealed(o)"), - nxt_string("false") }, + nxt_string("true") }, { nxt_string("var o = Object.defineProperties({}, {a:{writable:1}});" "o = Object.preventExtensions(o);" "Object.isSealed(o)"), - nxt_string("false") }, + nxt_string("true") }, { nxt_string("var o = Object.defineProperties({}, {a:{configurable:1}});" "o = Object.preventExtensions(o);" "Object.isSealed(o)"), - nxt_string("true") }, + nxt_string("false") }, { nxt_string("var o = Object.preventExtensions({a:1});" "Object.isFrozen(o)"), _______________________________________________ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-devel