Lasse R.H. Nielsen
a15025fc85
Harden StreamIterator against out-of-order events.
...
Users have seen event being sent *during* the `listen` call
to the underlying stream. This caught the `StreamIterator`
in an unanticipated state (subscription wasn't available yet).
Sending events during a `listen` call can currently happen
using a synchronous broadcast stream controller adding
events in the `onListen` callback.
That should be fixed so that broadcast stream subscriptions
are treated as paused during the `onListen` call like
single-subscription streams already are.
This change hardens the class against that particular malpratice,
but it's still possible to get into inconsistent states if the
`listen` call somehow manages to call back into the same
stream-iterator again. So, don't do that.
(The class also assumes that no stream will send events/call callbacks
* while paused.
* after cancelling
* after a done event
* while delivering another event.
If a stream does so, things will still crash.
It is believed that no platform stream will do any of these.)
Fixes #43779 .
BUG= http://dartbug.com/43779
Change-Id: If47065cfa9a1115425fdf51b147f2ed7154fef99
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167800
Reviewed-by: Nate Bosch <nbosch@google.com >
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com >
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com >
2020-10-16 20:20:02 +00:00
..
2020-03-27 00:14:40 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-04-09 22:01:42 +00:00
2020-01-09 22:04:37 +00:00
2020-04-09 22:01:42 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-06-26 20:59:28 +00:00
2020-03-24 08:21:36 +00:00
2020-03-27 15:59:27 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-03-16 16:54:56 +00:00
2020-04-15 18:30:23 +00:00
2020-09-25 10:37:00 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-05-04 08:14:43 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-04-28 23:49:43 +00:00
2020-04-28 23:49:43 +00:00
2020-01-09 22:04:37 +00:00
2020-03-25 00:24:33 +00:00
2020-03-25 00:24:33 +00:00
2020-03-25 00:24:33 +00:00
2020-01-09 22:04:37 +00:00
2020-04-09 22:01:42 +00:00
2020-03-25 00:24:33 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-03-24 08:21:36 +00:00
2020-04-22 00:12:24 +00:00
2020-01-09 22:04:37 +00:00
2020-04-07 20:09:26 +00:00
2020-01-09 22:04:37 +00:00
2020-03-27 15:59:27 +00:00
2020-03-11 01:12:48 +00:00
2020-01-09 22:04:37 +00:00
2020-03-27 15:59:27 +00:00
2020-03-27 15:59:27 +00:00
2020-03-27 15:59:27 +00:00
2020-03-27 15:59:27 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-03-27 15:59:27 +00:00
2020-03-27 15:59:27 +00:00
2020-03-27 15:59:27 +00:00
2020-03-27 15:59:27 +00:00
2020-03-27 15:59:27 +00:00
2020-03-27 15:59:27 +00:00
2020-03-27 15:59:27 +00:00
2020-03-27 15:59:27 +00:00
2020-03-27 15:59:27 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-03-27 15:59:27 +00:00
2020-06-26 20:59:28 +00:00
2020-05-04 08:14:43 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-03-25 00:24:33 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-10-16 20:20:02 +00:00
2020-04-16 21:15:45 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-08-21 09:53:10 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-04-09 22:01:42 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-03-25 00:24:33 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-03-19 23:31:30 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-03-24 08:21:36 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-03-25 00:24:33 +00:00
2020-05-18 08:51:34 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-02-15 02:40:00 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-06-26 20:59:28 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-04-03 21:47:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-01-09 22:04:37 +00:00
2020-03-24 08:21:36 +00:00
2020-05-04 08:14:43 +00:00
2020-01-09 22:04:37 +00:00