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

Unified Diff: third_party/pkg/angular/lib/change_detection/linked_list.dart

Issue 257423008: Update all Angular libs (run update_all.sh). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 months 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: third_party/pkg/angular/lib/change_detection/linked_list.dart
diff --git a/third_party/pkg/angular/lib/change_detection/linked_list.dart b/third_party/pkg/angular/lib/change_detection/linked_list.dart
index 1c31c5657dc29a6e4f3bd6c3b375fc39048980bd..e90a80cc39e04335967fbb5a01c69850bf9e36c0 100644
--- a/third_party/pkg/angular/lib/change_detection/linked_list.dart
+++ b/third_party/pkg/angular/lib/change_detection/linked_list.dart
@@ -5,7 +5,7 @@ class _LinkedListItem<I extends _LinkedListItem> {
I _previous, _next;
}
-class _LinkedList<L extends _LinkedList> {
+class _LinkedList<L extends _LinkedListItem> {
L _head, _tail;
static _Handler _add(_Handler list, _LinkedListItem item) {
@@ -92,19 +92,21 @@ abstract class _EvalWatchList {
static _EvalWatchRecord _add(_EvalWatchList list, _EvalWatchRecord item) {
assert(item._nextEvalWatch == null);
- assert(item._previousEvalWatch == null);
+ assert(item._prevEvalWatch == null);
var prev = list._evalWatchTail;
var next = prev._nextEvalWatch;
if (prev == list._marker) {
list._evalWatchHead = list._evalWatchTail = item;
- prev = prev._previousEvalWatch;
+ prev = prev._prevEvalWatch;
+ list._marker._prevEvalWatch = null;
+ list._marker._nextEvalWatch = null;
}
item._nextEvalWatch = next;
- item._previousEvalWatch = prev;
+ item._prevEvalWatch = prev;
if (prev != null) prev._nextEvalWatch = item;
- if (next != null) next._previousEvalWatch = item;
+ if (next != null) next._prevEvalWatch = item;
return list._evalWatchTail = item;
}
@@ -113,21 +115,21 @@ abstract class _EvalWatchList {
static void _remove(_EvalWatchList list, _EvalWatchRecord item) {
assert(item.watchGrp == list);
- var prev = item._previousEvalWatch;
+ var prev = item._prevEvalWatch;
var next = item._nextEvalWatch;
if (list._evalWatchHead == list._evalWatchTail) {
list._evalWatchHead = list._evalWatchTail = list._marker;
list._marker
.._nextEvalWatch = next
- .._previousEvalWatch = prev;
+ .._prevEvalWatch = prev;
if (prev != null) prev._nextEvalWatch = list._marker;
- if (next != null) next._previousEvalWatch = list._marker;
+ if (next != null) next._prevEvalWatch = list._marker;
} else {
if (item == list._evalWatchHead) list._evalWatchHead = next;
if (item == list._evalWatchTail) list._evalWatchTail = prev;
if (prev != null) prev._nextEvalWatch = next;
- if (next != null) next._previousEvalWatch = prev;
+ if (next != null) next._prevEvalWatch = prev;
}
}
}
@@ -137,11 +139,11 @@ class _WatchGroupList {
static WatchGroup _add(_WatchGroupList list, WatchGroup item) {
assert(item._nextWatchGroup == null);
- assert(item._previousWatchGroup == null);
+ assert(item._prevWatchGroup == null);
if (list._watchGroupTail == null) {
list._watchGroupHead = list._watchGroupTail = item;
} else {
- item._previousWatchGroup = list._watchGroupTail;
+ item._prevWatchGroup = list._watchGroupTail;
list._watchGroupTail._nextWatchGroup = item;
list._watchGroupTail = item;
}
@@ -151,10 +153,10 @@ class _WatchGroupList {
static bool _isEmpty(_WatchGroupList list) => list._watchGroupHead == null;
static void _remove(_WatchGroupList list, WatchGroup item) {
- var previous = item._previousWatchGroup;
+ var previous = item._prevWatchGroup;
var next = item._nextWatchGroup;
if (previous == null) list._watchGroupHead = next; else previous._nextWatchGroup = next;
- if (next == null) list._watchGroupTail = previous; else next._previousWatchGroup = previous;
+ if (next == null) list._watchGroupTail = previous; else next._prevWatchGroup = previous;
}
}

Powered by Google App Engine
This is Rietveld 408576698