@@ -94,8 +94,9 @@ class VmServiceWrapper extends VmService {
9494
9595 final _activeStreams = < String , Future <Success >> {};
9696
97- final activeFutures = < TrackedFuture < Object > > {} ;
97+ final activeFutureNames = < String > [] ;
9898
99+ @visibleForTesting
99100 Future <void > get allFuturesCompleted => _allFuturesCompleter.future;
100101
101102 Completer <bool > _allFuturesCompleter = Completer <bool >()
@@ -326,20 +327,6 @@ class VmServiceWrapper extends VmService {
326327
327328 // End Dart IO extension method wrappers.
328329
329- /// Testing only method to indicate that we don't really need to await all
330- /// currently pending futures.
331- ///
332- /// If you use this method be sure to indicate why you believe all pending
333- /// futures are safe to ignore. Currently the theory is this method should be
334- /// used after a hot restart to avoid bugs where we have zombie futures lying
335- /// around causing tests to flake.
336- @visibleForTesting
337- void doNotWaitForPendingFuturesBeforeExit () {
338- _allFuturesCompleter = Completer <bool >();
339- _allFuturesCompleter.complete (true );
340- activeFutures.clear ();
341- }
342-
343330 @visibleForTesting
344331 int vmServiceCallCount = 0 ;
345332
@@ -383,15 +370,14 @@ class VmServiceWrapper extends VmService {
383370 vmServiceCallCount++ ;
384371 vmServiceCalls.add (name);
385372
386- final trackedFuture = TrackedFuture (name, localFuture as Future <Object >);
387373 if (_allFuturesCompleter.isCompleted) {
388374 _allFuturesCompleter = Completer <bool >();
389375 }
390- activeFutures .add (trackedFuture );
376+ activeFutureNames .add (name );
391377
392378 void futureComplete () {
393- activeFutures .remove (trackedFuture );
394- if (activeFutures .isEmpty) {
379+ activeFutureNames .remove (name );
380+ if (activeFutureNames .isEmpty) {
395381 _allFuturesCompleter.safeComplete (true );
396382 }
397383 }
@@ -428,10 +414,6 @@ class VmServiceWrapper extends VmService {
428414 return parser (result.json);
429415 }
430416
431- /// Forces the VM to perform a full garbage collection.
432- Future <Success ?> collectAllGarbage () =>
433- _privateRpcInvoke ('collectAllGarbage' , parser: Success .parse);
434-
435417 Future <InstanceRef ?> getReachableSize (String isolateId, String targetId) =>
436418 _privateRpcInvoke (
437419 'getReachableSize' ,
@@ -512,10 +494,3 @@ class VmServiceWrapper extends VmService {
512494 return response.dapResponse.body;
513495 }
514496}
515-
516- class TrackedFuture <T > {
517- TrackedFuture (this .name, this .future);
518-
519- final String name;
520- final Future <T > future;
521- }
0 commit comments