summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/nxt_js.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nxt_js.c b/src/nxt_js.c
index 066d08f6..74663660 100644
--- a/src/nxt_js.c
+++ b/src/nxt_js.c
@@ -407,13 +407,12 @@ nxt_js_call(nxt_task_t *task, nxt_js_conf_t *jcf, nxt_js_cache_t *cache,
return NXT_ERROR;
}
- ret = njs_vm_start(vm, njs_value_arg(&retval));
+ cache->vm = vm;
+
+ ret = njs_vm_start(vm, &cache->array);
if (ret != NJS_OK) {
return NXT_ERROR;
}
-
- cache->vm = vm;
- cache->array = *njs_value_arg(&retval);
}
value = njs_vm_array_prop(vm, &cache->array, js->index, &opaque_value);