Skip to content
This repository has been 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
merged 1 commit into from
Dec 12, 2018

Conversation

JiaLiPassion
Copy link
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