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

onStoppedNotification and onUnhandledError shouldn't be allowed to flip synchronous via provider delegates #7343

Closed
benlesh opened this issue Sep 20, 2023 · 1 comment · Fixed by #7344
Assignees

Comments

@benlesh
Copy link
Member

benlesh commented Sep 20, 2023

We currently allow the TestScheduler (or anyone who wants to fiddle with the delegate for timeoutProvider) to allow config.onUnhandledError and config.onStoppedNotification to synchronously dispatch. The problem with that is if either of those throw while synchronous, it will unwind the stack and cause all sorts of crazy stuff. The provider delegates are meant primarily so that TestScheduler can synchronously control what is going on with observable emissions. onUnhandledError and onStoppedNotification are firmly outside of that lifecycle and should always be dispatched in their own call stack to prevent issues.

benlesh added a commit to benlesh/rxjs that referenced this issue Sep 20, 2023
@benlesh benlesh self-assigned this Sep 20, 2023
@benlesh
Copy link
Member Author

benlesh commented Sep 20, 2023

This is also a prerequisite for getting to where we can cleanly publish @rxjs/observable.

benlesh added a commit to benlesh/rxjs that referenced this issue Sep 21, 2023
benlesh added a commit that referenced this issue Oct 27, 2023
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 a pull request may close this issue.

1 participant