]> git.kaiwu.me - njs.git/commit
QuickJS: fixed Buffer.toJSON() data ownership
authorDmitry Volyntsev <xeioex@nginx.com>
Thu, 21 May 2026 23:50:41 +0000 (16:50 -0700)
committerDmitry Volyntsev <xeioexception@gmail.com>
Tue, 26 May 2026 21:45:24 +0000 (14:45 -0700)
commitcc17225d10154565a82de709fab8465931b876b0
tree0fae4c19151c36847361d78795ea8cf8252cba48
parenta1d2131f664f725bb9c187225ab7582f2a5efa6c
QuickJS: fixed Buffer.toJSON() data ownership

The property definition consumes ownership, so freeing the result object
is enough on later error paths.

Returned JS_EXCEPTION on property-definition failures instead of the
unrelated typed-array lookup result.
src/qjs_buffer.c