[njs] Modules: simplified setTimeout() timer callback.

Dmitry Volyntsev xeioex at nginx.com
Thu Nov 30 03:53:40 UTC 2023


details:   https://hg.nginx.org/njs/rev/f64d1f9f19e5
branches:  
changeset: 2242:f64d1f9f19e5
user:      Dmitry Volyntsev <xeioex at nginx.com>
date:      Wed Nov 29 18:43:45 2023 -0800
description:
Modules: simplified setTimeout() timer callback.

diffstat:

 nginx/ngx_js.c |  4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diffs (19 lines):

diff -r 9a6a79e21822 -r f64d1f9f19e5 nginx/ngx_js.c
--- a/nginx/ngx_js.c	Wed Nov 29 18:43:37 2023 -0800
+++ b/nginx/ngx_js.c	Wed Nov 29 18:43:45 2023 -0800
@@ -973,14 +973,12 @@ ngx_js_timer_handler(ngx_event_t *ev)
     ngx_js_event_t      *event;
     ngx_connection_t    *c;
     njs_external_ptr_t   external;
-    njs_opaque_value_t   retval;
 
     event = (ngx_js_event_t *) ((u_char *) ev - offsetof(ngx_js_event_t, ev));
 
     vm = event->vm;
 
-    ret = njs_vm_invoke(vm, event->function, event->args, event->nargs,
-                        njs_value_arg(&retval));
+    ret = njs_vm_call(vm, event->function, event->args, event->nargs);
 
     external = njs_vm_external_ptr(vm);
     ctx = ngx_external_ctx(vm, external);


More information about the nginx-devel mailing list