]> git.kaiwu.me - njs.git/commit
Fetch: fixed QuickJS conversion error handling
authorDmitry Volyntsev <xeioex@nginx.com>
Wed, 3 Jun 2026 02:04:33 +0000 (19:04 -0700)
committerDmitry Volyntsev <xeioexception@gmail.com>
Wed, 3 Jun 2026 21:34:17 +0000 (14:34 -0700)
commit02c031a49a582749c3eb51cae23840f3fbe6c206
tree2005ff0288cb9355a7311a38e2f10de9fa58e413
parent77ca08acd534b282e034ff0d4a7b236d7a76ee9f
Fetch: fixed QuickJS conversion error handling

Preserve exceptions raised by QuickJS conversions and synthesize an out of
memory exception only for silent pool allocation failures in ngx_qjs_string()
callers.

Use JS_GetOpaque() where a class mismatch is a normal miss, avoiding a stale
pending TypeError while continuing with non-Headers and non-Request input.
Also release the headers init value before throwing for a non-object Headers
option.
nginx/ngx_qjs_fetch.c