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

should preserve domain of the callback function #664

Closed
wants to merge 3 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@dimichgh

dimichgh commented Jun 19, 2015

currently, due to sharing of the promise, the caller that does the
resolve/reject passes its domain to other callbacks causing unexpected
behavior.

Semenov, Dmytro()
should preserve domain of the callback function
currently, due to sharing of the promise, the caller that does the
resolve/reject passes its domain to other callbacks causing unexpected
behavior.
@benjamingr

This comment has been minimized.

Show comment
Hide comment
@benjamingr

benjamingr Jun 19, 2015

Collaborator

Hehe, Function#bind in bluebird. How would this work with bluebird's .bind for context preservation?

Collaborator

benjamingr commented Jun 19, 2015

Hehe, Function#bind in bluebird. How would this work with bluebird's .bind for context preservation?

@dimichgh

This comment has been minimized.

Show comment
Hide comment
@dimichgh

dimichgh Jun 19, 2015

It seems process.bind is smart enough to keep Function#bind reference bound.
I have added tests for that.

dimichgh commented Jun 19, 2015

It seems process.bind is smart enough to keep Function#bind reference bound.
I have added tests for that.

@petkaantonov

This comment has been minimized.

Show comment
Hide comment
@petkaantonov

petkaantonov Jul 1, 2015

Owner

Can you remove the implementation from the PR and just leave the tests?

A full fix will have to remove all the domain code from async.js and also it needs to be implemented more efficiently.

Owner

petkaantonov commented Jul 1, 2015

Can you remove the implementation from the PR and just leave the tests?

A full fix will have to remove all the domain code from async.js and also it needs to be implemented more efficiently.

@dimichgh

This comment has been minimized.

Show comment
Hide comment
@dimichgh

dimichgh Jul 3, 2015

sure, let me edit it out.

dimichgh commented Jul 3, 2015

sure, let me edit it out.

Semenov, Dmytro()
removed fix, left failing tests (updated)
letting bluebird team implement optimized solution

petkaantonov added a commit that referenced this pull request Jul 3, 2015

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