]> git.kaiwu.me - njs.git/commit
Modules: removed "js vm init" during configuration parsing.
authorDmitry Volyntsev <xeioex@nginx.com>
Tue, 7 Apr 2026 01:55:00 +0000 (18:55 -0700)
committerDmitry Volyntsev <xeioexception@gmail.com>
Mon, 13 Apr 2026 14:42:43 +0000 (07:42 -0700)
commitc4389399571fe991632fd8da563a5e31ebb291e1
treebb5892cb196726b86dbc16e71a79e280e57ef78f
parent79d5b1866738088c359681b62499d27b70f210ea
Modules: removed "js vm init" during configuration parsing.

Previously, a notice-level log message "js vm init %s: %p" was emitted
for each JS engine created during configuration parsing.  This message
leaked to the compiled-in default error log even when the user
explicitly configured logging elsewhere, because config-time logging
uses the initial cycle log whose file descriptor is opened before the
user's error_log directive takes effect.

The log message was used for VM deduplication tests. The tests are
updated to verify unique engine identifiers via HTTP and stream
responses instead of grepping for log messages.

This fixes #1042 issue on Github.
nginx/ngx_js.c
nginx/ngx_js.h
nginx/t/js_import2.t
nginx/t/js_merge_location_blocks.t
nginx/t/js_merge_server_blocks.t
nginx/t/stream_js.t
nginx/t/stream_js_import2.t