src: fix line numbers on core errors
authorcjihrig <cjihrig@gmail.com>
Fri, 11 Dec 2015 19:57:45 +0000 (14:57 -0500)
committerMyles Borins <mborins@us.ibm.com>
Tue, 19 Jan 2016 19:52:23 +0000 (11:52 -0800)
commit5ba08fbf76cd4374e7ce474541a7f3ed9560ccb2
tree7fbb8cae3825ff18989e75935434e62c6be3aae5
parent15c295a21b53208c32becb49428765cd799af0ff
src: fix line numbers on core errors

In dfee4e3712ac4673b5fc472a8f77ac65bdc65f87, the module wrapper
and line offset used when wrapping module code was changed to
better report errors on the first line of modules. However, that
commit did not update the runInThisContext() call used to
execute the core modules, so their error line numbers have been
off by one. This commit provides the correct lineOffset for core
modules.

Refs: https://github.com/nodejs/node/pull/2867
PR-URL: https://github.com/nodejs/node/pull/4254
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
src/node.js
test/message/core_line_numbers.js [new file with mode: 0644]
test/message/core_line_numbers.out [new file with mode: 0644]