Skip to content

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

@benlesh

Description

@benlesh

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions