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

Fix 6783 patched binds v2 #6797

Merged
merged 5 commits into from Feb 8, 2022

Conversation

benlesh
Copy link
Member

@benlesh benlesh commented Feb 4, 2022

This just has an alternative approach to #6796 ..

So we can choose.

@cartant
Copy link
Collaborator

cartant commented Feb 4, 2022

I think this version highlights that this is not really a reasonable change. I mean, this is literally saying "don't call bind on the passed observer methods because it's possible they could have a non-standard/broken bind implementation".

@kwonoj
Copy link
Member

kwonoj commented Feb 5, 2022

I shared my opinion in original issue already, I'm still bit failed to understand if there's reason rxjs should provide its core implementation for the cases of user / application breaks spec behavior of javascript itself. I know we can, but reason why is not I'm fully getting yet.

@getify
Copy link

getify commented Feb 5, 2022

I explained the WHY here: #6783 (comment)

Copy link
Collaborator

@cartant cartant left a comment

Choose a reason for hiding this comment

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

Having read the detailed use case in this comment, I'm in favour of this version of the change. However, I think it would benefit from a having a comment added explaining that Function.prototype.bind is used directly for compatibility with Monio. Maybe a link to Kyle's comment?

Apparently, code exists in the wild that will patch function bind to do something other than return a function that will execute the function instance, so we cannot rely on bind.

Resolves ReactiveX#6783
@benlesh benlesh merged commit 0ab91eb into ReactiveX:master Feb 8, 2022
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