aboutsummaryrefslogtreecommitdiff
path: root/nginx/ngx_http_js_module.c
diff options
context:
space:
mode:
authorDmitry Volyntsev <xeioex@nginx.com>2019-02-06 15:50:03 +0300
committerDmitry Volyntsev <xeioex@nginx.com>2019-02-06 15:50:03 +0300
commit6af4eb68f3e7c35adc10f87a499c9947e144a92f (patch)
tree757c1ec887e6f109d458ba1ce818b0fa28e47585 /nginx/ngx_http_js_module.c
parenta23dfa3894c28dc58f5d3613e974d27ae02d4dcb (diff)
downloadnjs-6af4eb68f3e7c35adc10f87a499c9947e144a92f.tar.gz
njs-6af4eb68f3e7c35adc10f87a499c9947e144a92f.zip
Modules: reporting njs filenames in exceptions.
Diffstat (limited to 'nginx/ngx_http_js_module.c')
-rw-r--r--nginx/ngx_http_js_module.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/nginx/ngx_http_js_module.c b/nginx/ngx_http_js_module.c
index a73c2d24..c65230d6 100644
--- a/nginx/ngx_http_js_module.c
+++ b/nginx/ngx_http_js_module.c
@@ -2116,6 +2116,10 @@ ngx_http_js_include(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
options.backtrace = 1;
options.ops = &ngx_http_js_ops;
+ file = value[1];
+ options.file.start = file.data;
+ options.file.length = file.len;
+
jmcf->vm = njs_vm_create(&options);
if (jmcf->vm == NULL) {
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "failed to create JS VM");