Skip to content

Conversation

@cjihrig
Copy link
Contributor

In dfee4e3, 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: #2867

@mscdexmscdex added the lib / src Issues and PRs related to general changes in the lib or src directory. label Dec 12, 2015
@mscdex
Copy link
Contributor

LGTM

2 similar comments
@jasnell
Copy link
Member

LGTM

@JungMinu
Copy link
Member

LGTM

@bnoordhuis
Copy link
Member

Maybe you can add a short regression test to test/messages, e.g. for require('punycode').decode('x')? That's a module that almost never changes.

In dfee4e3, 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: nodejs#2867 PR-URL: nodejs#4254 Reviewed-By: Brian White <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Minwoo Jung <[email protected]>
@cjihrig
Copy link
ContributorAuthor

@bnoordhuis added the requested test. LGTY?

@bnoordhuis
Copy link
Member

LGTM

@cjihrig
Copy link
ContributorAuthor

cjihrig added a commit that referenced this pull request Dec 14, 2015
In dfee4e3, 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: #2867 PR-URL: #4254 Reviewed-By: Brian White <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Minwoo Jung <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
@cjihrig
Copy link
ContributorAuthor

CI was happy. Landed in b799a74

@cjihrigcjihrig closed this Dec 14, 2015
@cjihrigcjihrig deleted the line-nos branch December 14, 2015 22:07
cjihrig added a commit that referenced this pull request Dec 15, 2015
In dfee4e3, 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: #2867 PR-URL: #4254 Reviewed-By: Brian White <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Minwoo Jung <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
@rvaggrvagg mentioned this pull request Dec 17, 2015
cjihrig added a commit that referenced this pull request Dec 30, 2015
In dfee4e3, 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: #2867 PR-URL: #4254 Reviewed-By: Brian White <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Minwoo Jung <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jan 19, 2016
In dfee4e3, 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: #2867 PR-URL: #4254 Reviewed-By: Brian White <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Minwoo Jung <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
@MylesBorinsMylesBorins mentioned this pull request Jan 19, 2016
scovetta pushed a commit to scovetta/node that referenced this pull request Apr 2, 2016
In dfee4e3, 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: nodejs#2867 PR-URL: nodejs#4254 Reviewed-By: Brian White <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Minwoo Jung <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lib / srcIssues and PRs related to general changes in the lib or src directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@cjihrig@mscdex@jasnell@JungMinu@bnoordhuis@MylesBorins