From c5943523cc765c7a3805c6be13c3bac2e4c3d306 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Wed, 6 May 2020 19:30:17 +0000 Subject: [PATCH] [dart:html] Add changelog note for EventStreamSubscription.cancel Closes https://github.com/dart-lang/sdk/issues/41653 Change-Id: I0e5cac66a3a80c3c753d740bf8bf90f68addaf6d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146880 Commit-Queue: Srujan Gaddam Reviewed-by: Nicholas Shahan --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ccf3791976..ae01df3b4a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,18 @@ null-safe changes in the `Set` interface, it will now return `false` instead. The same applies for `CssClassSet.toggle`. +* `EventStreamSubscription.cancel` method used to return `null`, but since + `StreamSubscription.cancel` has changed to be non-nullable, this method + returns an empty `Future` instead. Due to an optimization on `null` + `Future`s, this method used to complete synchronously, but now that the + `Future` is empty instead, it completes asynchronously, therefore + potentially invalidating code that relied on the synchronous side-effect. + This change will only affect code using sound null-safety. See issue + [41653][] for more details. + +[41653]: https://github.com/dart-lang/sdk/issues/41653 + + #### `dart:io` * Class `OSError` now implements `Exception`. This change means `OSError` will