]> git.kaiwu.me - njs.git/commit
Fixed String.fromCodePoint(), broken after 0b82f1c9268c.
authorValentin Bartenev <vbart@nginx.com>
Sat, 27 Jul 2019 18:12:32 +0000 (21:12 +0300)
committerValentin Bartenev <vbart@nginx.com>
Sat, 27 Jul 2019 18:12:32 +0000 (21:12 +0300)
commitf05a6e979ffff9e3dfd471b5184c332b1ad1cffb
tree0b255d7e89faa40d3b829abeca16b5f24b6250ed
parent820d0da0d9e6f5acbf0bb9dd1739a6ff2ba332af
Fixed String.fromCodePoint(), broken after 0b82f1c9268c.

As it turned out, fromCodePoint() has shared the same handler with
fromCharCode(), but according to the specification these functions
have different semantics.  As a result, before 0b82f1c9268c both
functions had behaviour of fromCodePoint(), while after the change
they had behaviour of fromCharCode().

So, the fix is to revert back the code used before the change,
but only for fromCodePoint().
njs/njs_string.c
njs/test/njs_unit_test.c