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

util: fix wrong usage of Error.prepareStackTrace #27250

Closed
wants to merge 1 commit into from

Conversation

addaleax
Copy link
Member

The return value of Error.prepareStackTrace will become the result
of Error.stack accesses. Setting Error.stack inside this callback
relies on the fact that the magic get accessor detects the change in
the middle of formatting, and is unnecessary in this instance.

Refs: v8#96

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot nodejs-github-bot added the util Issues and PRs related to the built-in util module. label Apr 16, 2019
The return value of Error.prepareStackTrace will become the result
of Error.stack accesses. Setting Error.stack inside this callback
relies on the fact that the magic get accessor detects the change in
the middle of formatting, and is unnecessary in this instance.

Refs: v8#96
@addaleax addaleax changed the title utils: fix wrong usage of Error.prepareStackTrace util: fix wrong usage of Error.prepareStackTrace Apr 16, 2019
@addaleax addaleax force-pushed the fix-prep-stacktrace branch from 00f5a1b to 8c0fcdc Compare April 16, 2019 08:29
@addaleax addaleax added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 16, 2019
@nodejs-github-bot
Copy link
Collaborator

@addaleax
Copy link
Member Author

Landed in 2948e96

@addaleax addaleax closed this Apr 18, 2019
@addaleax addaleax deleted the fix-prep-stacktrace branch April 18, 2019 11:05
addaleax pushed a commit that referenced this pull request Apr 18, 2019
The return value of Error.prepareStackTrace will become the result
of Error.stack accesses. Setting Error.stack inside this callback
relies on the fact that the magic get accessor detects the change in
the middle of formatting, and is unnecessary in this instance.

Refs: v8#96

PR-URL: #27250
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Masashi Hirano <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Anto Aravinth <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. util Issues and PRs related to the built-in util module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.