Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

fix(node): fix #1164, don't patch uncaughtException to prevent endless loop.#1170

Merged
mhevery merged 1 commit intoangular:masterfrom
JiaLiPassion:node-newlistener
Dec 12, 2018
Merged

fix(node): fix #1164, don't patch uncaughtException to prevent endless loop.#1170
mhevery merged 1 commit intoangular:masterfrom
JiaLiPassion:node-newlistener

Conversation

@JiaLiPassion
Copy link
Copy Markdown
Collaborator

@JiaLiPassion JiaLiPassion commented Dec 12, 2018

fix #1164.

in nodejs 10, there is a logic in domain.js.

process.on('newListener', (name, listener) => {
  if (name === 'uncaughtException' &&
      listener !== domainUncaughtExceptionClear) {
    // Make sure the first listener for `uncaughtException` always clears
    // the domain stack.
    process.removeListener(name, domainUncaughtExceptionClear);
    process.prependListener(name, domainUncaughtExceptionClear);
  }
});

here listener !== domainUncaughtExceptionClear will crash zone, because listener will be zoneTask.invoke instead of the original listener.

So this PR will just bypass uncaughtException.


also update the travis CI to nodejs 10, to make nodejs 10 work, I updated yarn.lock to update natives to 1.1.3, otherwise gulp will not work. gulpjs/gulp#2162

@mhevery mhevery merged commit 33a0ad6 into angular:master Dec 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Node Process crashes with 'Call stack exceeded' error in zone-node on Node 10

3 participants