Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node: NativeModule should set lineOffset to -1 #4265

Closed
wants to merge 1 commit into from

Conversation

yorkie
Copy link
Contributor

@yorkie yorkie commented Dec 13, 2015

Because we basically wrap the NativeModule, this fixes the
error stack printed by native module like:

events.js:143
      throw er; // Unhandled 'error' event

But the correct line number should be here: https://github.com/nodejs/node/blob/master/lib/events.js#L142, that's because we used -1 as lineOffset in calling ScriptContextify but using the default 0 for natives.

Because we commonly wrap the NativeModule, this fixes the
error stack printed by native module like:

events.js:143
      throw er; // Unhandled 'error' event
@mscdex
Copy link
Contributor

mscdex commented Dec 13, 2015

Duplicate of #4254.

@mscdex mscdex closed this Dec 13, 2015
@ChALkeR ChALkeR added the duplicate Issues and PRs that are duplicates of other issues or PRs. label Dec 13, 2015
@yorkie
Copy link
Contributor Author

yorkie commented Dec 14, 2015

Ah... I see, thanks :-)

@yorkie yorkie deleted the fix/native-module-lineOffset branch December 14, 2015 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants