]> git.kaiwu.me - njs.git/commit
njs_vm_run() is rectified.
authorDmitry Volyntsev <xeioex@nginx.com>
Fri, 28 Dec 2018 09:42:29 +0000 (12:42 +0300)
committerDmitry Volyntsev <xeioex@nginx.com>
Fri, 28 Dec 2018 09:42:29 +0000 (12:42 +0300)
commitea4c0e2e47030c8f3d4a3133cb624b5bf5e8e427
tree4ffeaaf0b2a80b592e22375bb03d64a3a939058f
parentfa888fd9a210fd4a2963ab68486e66e202fe33d9
njs_vm_run() is rectified.

Previously, both njs_vm_call() and njs_vm_run() can be used to run njs
code. njs_vm_call() was used to invoke a single function, while
njs_vm_run() was used to run global code as well to process the events.

At first invocation njs_vm_run() executed global code, all the next
invocations it processed pending events.

The solution is splitting njs_vm_run() into two functions. One for
events processing and another for running the global code.
nginx/ngx_http_js_module.c
nginx/ngx_stream_js_module.c
njs/njs.c
njs/njs.h
njs/njs_shell.c
njs/test/njs_interactive_test.c
njs/test/njs_unit_test.c