File tree Expand file tree Collapse file tree 3 files changed +13
-14
lines changed Expand file tree Collapse file tree 3 files changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -73,8 +73,6 @@ class LibraryCycleGraphLoader {
7373 /// for its sorting, so earlier phases are processed first in [_nextIdToLoad] .
7474 final SplayTreeMap <int , List <AssetId >> _idsToLoad = SplayTreeMap ();
7575
76- final List <(int , AssetId )> _loadingIds = [];
77-
7876 /// All loaded library cycles, by asset.
7977 final Map <AssetId , PhasedValue <LibraryCycle >> _cycles = {};
8078
@@ -136,7 +134,6 @@ class LibraryCycleGraphLoader {
136134 // Return the last ID from the list of IDs at this phase because it's
137135 // cheapest to remove in `_removeIdToLoad`.
138136 final result = first.value.last;
139- _loadingIds.add ((first.key, result));
140137 return (first.key, result);
141138 }
142139
Original file line number Diff line number Diff line change @@ -55,13 +55,15 @@ class LruCache<K, V> {
5555 _currentWeightTotal -= entry.weight;
5656 _entries.remove (key);
5757
58+ // Remove from linked list.
59+ entry.previous? .next = entry.next;
60+ entry.next? .previous = entry.previous;
61+
5862 if (entry == _tail) {
5963 _tail = entry.next;
60- _tail? .previous = null ;
6164 }
6265 if (entry == _head) {
6366 _head = entry.previous;
64- _head? .next = null ;
6567 }
6668
6769 return entry.value;
@@ -75,12 +77,9 @@ class LruCache<K, V> {
7577 _tail = link.next;
7678 }
7779
78- if (link.previous != null ) {
79- link.previous! .next = link.next;
80- }
81- if (link.next != null ) {
82- link.next! .previous = link.previous;
83- }
80+ // Remove from linked list.
81+ link.previous? .next = link.next;
82+ link.next? .previous = link.previous;
8483
8584 _head? .next = link;
8685 link.previous = _head;
Original file line number Diff line number Diff line change 1414dart test/invalidation/invalidation_leak_checker.dart setup
1515
1616leak_amount=$( dart test/invalidation/invalidation_leak_checker.dart)
17- leak_limit=60000
17+ leak_limit=15000
1818
19- if test $(( leak_amount)) -gt 60000 ; then
19+ if test $(( leak_amount)) -gt " $leak_limit " ; then
2020 echo " Measured leak size $leak_amount > $leak_limit , failing!"
2121 exit 1
2222else
3030# 52455, 52332, 52308
3131#
3232# Initial check-in with https://dart-review.googlesource.com/c/sdk/+/441740:
33- # 21482, 11568, 13186
33+ # 21482, 11568, 13186
34+ #
35+ # After `build_runner` leak fixes and analyzer 7.7.1 with 441740:
36+ # 13147, 12515, 13320
You can’t perform that action at this time.
0 commit comments