Skip to content

emit error events consistently in next tick#5251

Closed
thefourtheye wants to merge 1 commit intonodejs:masterfrom
thefourtheye:emit-error-in-nextTick
Closed

emit error events consistently in next tick#5251
thefourtheye wants to merge 1 commit intonodejs:masterfrom
thefourtheye:emit-error-in-nextTick

Conversation

@thefourtheye
Copy link
Contributor

Similar to callbacks, error events also have to be emitted in the
nextTick, so that they will be guaranteed to work asynchronously. This
patch makes sure all the error events

  1. use arrow functions consistently (this is chosen because they
    maintain the context and that would be useful more often)
  2. are emitted in the process.nextTick

I added major label as well, as this changes the behaviour of the existing system.

Also, this removes few TODOs left by @isaacs and @bnoordhuis

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

discuss Issues opened for discussions and feedbacks. errors Issues and PRs related to JavaScript errors originated in Node.js core. lib / src Issues and PRs related to general changes in the lib or src directory. semver-major PRs that contain breaking changes and should be released in the next major version. stalled Issues and PRs that are stalled.

Projects

None yet

Development

Successfully merging this pull request may close these issues.