forked from nodejs/node-v0.x-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
module: fix column offset on first line stack trace
When modules are loaded by require(), they are wrapped in a function. This added text causes errors on the first line of a file to be offset by the length of the function declaration. For example, an error on the first character of a module would appear as if it were on column 63. To fix this problem I added line and column offset support to the ContextifyScript object and added options to the runInContext(and friends) function. I then added a column offset to module._compile that compensates for the function wrapper. Fixes nodejs#9445
- Loading branch information
1 parent
0df5e1c
commit 52a44e9
Showing
4 changed files
with
71 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters