]> git.kaiwu.me - njs.git/commit
Fixed evaluation of computed property names with function expressions.
authorDmitry Volyntsev <xeioex@nginx.com>
Wed, 17 May 2023 07:39:45 +0000 (00:39 -0700)
committerDmitry Volyntsev <xeioex@nginx.com>
Wed, 17 May 2023 07:39:45 +0000 (00:39 -0700)
commit7e7c1ac7688d089915754ba5c6ccee227ffb2961
tree05ce84a3dcf0f7c6d6286a1b3a01aea3e1400fd9
parente9d814a0a8c1857f78fdc85ed1461cb9101ebf4e
Fixed evaluation of computed property names with function expressions.

Previously, while evaluating a property name expression with a function
expression as the right side, the evaluation modified the value used to
compute the property name in-place.  The in-place modification changes
values not intended to be changed.

The issue was introduced in 74d30c2d70f3 (0.7.8).

This fixes #640 issue on Github.
src/njs_generator.c
src/test/njs_unit_test.c