]> git.kaiwu.me - njs.git/commit
Fixed Array.prototype.slice() with slow "this" argument.
authorDmitry Volyntsev <xeioex@nginx.com>
Sat, 23 Apr 2022 00:02:36 +0000 (17:02 -0700)
committerDmitry Volyntsev <xeioex@nginx.com>
Sat, 23 Apr 2022 00:02:36 +0000 (17:02 -0700)
commit2e00e95473861846aa8538be87db07699d9f676d
treefca7be16cd6dc3878a41afe512943724fc6a0bdf
parent8b39afdad9a0761e0a5d4af1a762bd9a6daef572
Fixed Array.prototype.slice() with slow "this" argument.

Previously, when "this" argument was not a fast array, but the "deleted" array
was a fast array, the "deleted" array may be left in uninitialized state if
"this" argument had gaps.

This fix is to ensure that "deleted" is properly initialized.

This fixes #485 issue on Github.
src/njs_array.c
src/test/njs_unit_test.c