diff options
author | Dmitry Volyntsev <xeioex@nginx.com> | 2019-02-06 15:50:03 +0300 |
---|---|---|
committer | Dmitry Volyntsev <xeioex@nginx.com> | 2019-02-06 15:50:03 +0300 |
commit | 6af4eb68f3e7c35adc10f87a499c9947e144a92f (patch) | |
tree | 757c1ec887e6f109d458ba1ce818b0fa28e47585 /nginx/ngx_http_js_module.c | |
parent | a23dfa3894c28dc58f5d3613e974d27ae02d4dcb (diff) | |
download | njs-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.c | 4 |
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"); |