]> git.kaiwu.me - njs.git/commit
Fixed property set instruction when key modifies base binding.
authorDmitry Volyntsev <xeioex@nginx.com>
Fri, 16 Sep 2022 03:20:10 +0000 (20:20 -0700)
committerDmitry Volyntsev <xeioex@nginx.com>
Fri, 16 Sep 2022 03:20:10 +0000 (20:20 -0700)
commite9eab88f05319ab5a7c7c6aa0165bcf53aedeadf
treea06a36d9ca056b1e368bd336582796ff47ffbf89
parent2f585c83ce424553be466ed41490990371a141f3
Fixed property set instruction when key modifies base binding.

Previously, when obj[prop] expression was evaluated, and prop was an
object with custom "toString" method, which modifies obj binding as its
side-effect, the binding update was visible to property set instruction
which is not correct.

This closes #550 issue on Github.
src/njs_object.c
src/njs_value.c
src/njs_value.h
src/njs_vmcode.c
src/test/njs_unit_test.c