[njs] Fixed njs_vm_call().

Dmitry Volyntsev xeioex at nginx.com
Thu Jan 10 16:00:52 UTC 2019


details:   https://hg.nginx.org/njs/rev/d357ff6b4fe3
branches:  
changeset: 721:d357ff6b4fe3
user:      hongzhidao <hongzhidao at gmail.com>
date:      Tue Jan 08 06:14:36 2019 +0800
description:
Fixed njs_vm_call().

diffstat:

 njs/njs.c |  6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diffs (18 lines):

diff -r 5da4da7386a8 -r d357ff6b4fe3 njs/njs.c
--- a/njs/njs.c	Tue Jan 08 05:02:20 2019 +0800
+++ b/njs/njs.c	Tue Jan 08 06:14:36 2019 +0800
@@ -475,12 +475,10 @@ njs_vm_call(njs_vm_t *vm, njs_function_t
                                 NJS_INDEX_GLOBAL_RETVAL,
                                 sizeof(njs_vmcode_generic_t));
 
-    if (nxt_slow_path(ret == NXT_ERROR)) {
-        return ret;
+    if (nxt_fast_path(ret == NJS_APPLIED)) {
+        ret = njs_vm_start(vm);
     }
 
-    ret = njs_vm_start(vm);
-
     vm->current = current;
 
     return ret;


More information about the nginx-devel mailing list