Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Unified Diff: sdk/lib/async/stream_controller.dart

Issue 11308154: Stream isolates. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Fixes and test. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sdk/lib/async/stream_controller.dart
diff --git a/sdk/lib/async/stream_controller.dart b/sdk/lib/async/stream_controller.dart
index f0bd7a7e3e008374de45b2a915e1e09642a69431..b12407d51d7ccfc688c8acbfde0ed1106bff0279 100644
--- a/sdk/lib/async/stream_controller.dart
+++ b/sdk/lib/async/stream_controller.dart
@@ -410,7 +410,7 @@ class _ControllerSubscription<T> extends _InternalLink
}
/** Helper class for [ControllerSubcription] to store pending subscriptions. */
-class _PendingSubscriptionChanges implements _InternalLinkList {
+class _PendingSubscriptionChanges extends _InternalLinkList {
List<_ControllerSubscription> pendingRemoves;
/** Add a pending subscription. */
@@ -538,7 +538,7 @@ abstract class _InternalLinkList extends _InternalLink {
* This effectively adds it at the end of the list.
*/
static void add(_InternalLinkList list, _InternalLink element) {
- if (!_InternalLink.isUnlinked(element)) _InternalLink._unlink(element);
+ if (!_InternalLink.isUnlinked(element)) _InternalLink.unlink(element);
_InternalLink listEnd = list._previousLink;
listEnd._nextLink = element;
list._previousLink = element;
@@ -555,11 +555,13 @@ abstract class _InternalLinkList extends _InternalLink {
static bool isEmpty(_InternalLinkList list) => _InternalLink.isUnlinked(list);
/** Moves all elements from the list [other] to [list]. */
- static void addAll(InternalLinkList list, InternalLinkList other) {
+ static void addAll(_InternalLinkList list, _InternalLinkList other) {
if (isEmpty(other)) return;
if (isEmpty(list)) {
list._nextLink = other._nextLink;
list._previousLink = other._previousLink;
+ list._nextLink._previousLink = list;
+ list._previousLink._nextLink = list;
} else {
_InternalLink listLast = list._previousLink;
_InternalLink otherNext = other._nextLink;

Powered by Google App Engine
This is Rietveld 408576698