diff options
author | Dmitry Volyntsev <xeioex@nginx.com> | 2018-09-27 17:37:55 +0300 |
---|---|---|
committer | Dmitry Volyntsev <xeioex@nginx.com> | 2018-09-27 17:37:55 +0300 |
commit | 7b61ed024b7dbc727ba7ded46ed08d824c1cf24a (patch) | |
tree | 79ccf70d400280b2378b626a5f50fb3296a73836 /nginx/ngx_http_js_module.c | |
parent | 8cd191a947cd46d20a547a6d4e5189f02b705be2 (diff) | |
download | njs-7b61ed024b7dbc727ba7ded46ed08d824c1cf24a.tar.gz njs-7b61ed024b7dbc727ba7ded46ed08d824c1cf24a.zip |
Fixed http response and parent getters.
Getters are expected to set resulting value to the provided
argument, not to vm->retval.
Diffstat (limited to 'nginx/ngx_http_js_module.c')
-rw-r--r-- | nginx/ngx_http_js_module.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nginx/ngx_http_js_module.c b/nginx/ngx_http_js_module.c index 7624d438..3121bad3 100644 --- a/nginx/ngx_http_js_module.c +++ b/nginx/ngx_http_js_module.c @@ -1844,7 +1844,7 @@ ngx_http_js_ext_get_response(njs_vm_t *vm, njs_value_t *value, void *obj, ctx = ngx_http_get_module_ctx(r, ngx_http_js_module); - njs_vm_retval_set(vm, njs_value_arg(&ctx->args[1])); + njs_value_assign(value, njs_value_arg(&ctx->args[1])); return NJS_OK; } @@ -2189,7 +2189,7 @@ ngx_http_js_ext_get_parent(njs_vm_t *vm, njs_value_t *value, void *obj, return NJS_ERROR; } - njs_vm_retval_set(vm, njs_value_arg(&ctx->args[0])); + njs_value_assign(value, njs_value_arg(&ctx->args[0])); return NJS_OK; } |