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: mark promises as handled as soon as possible #1952

Merged
merged 1 commit into from Jun 12, 2015

Conversation

vkurchatkin
Copy link
Contributor

Fixes: #1912

R=@petkaantonov

@@ -275,6 +275,20 @@ asyncTest('Attaching a promise catch in a process.nextTick is soon enough to' +
});
});

asyncTest('Some weird edge-case', function(done) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have no idea how to describe this test case

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While inside setImmediate, catching a rejected promise derived from returning a rejected promise in a fulfillment handler prevents unhandledRejection

@domenic
Copy link
Contributor

domenic commented Jun 11, 2015

LGTM with nit/name changes assuming all existing tests still pass. This is pretty delicate logic but also quite well-tested :)

@petkaantonov
Copy link
Contributor

LGTM

@@ -275,6 +275,20 @@ asyncTest('Attaching a promise catch in a process.nextTick is soon enough to' +
});
});

asyncTest('Some weird edge-case', function(done) {
var e = new Error();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused?

Fixes: nodejs#1912
PR-URL: nodejs#1952
Reviewed-By: Domenic Denicola <d@domenic.me>
Reviewed-By: Petka Antonov <petka_antonov@hotmail.com>
@vkurchatkin vkurchatkin merged commit a251657 into nodejs:master Jun 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants