From b722a744e6a8dd40e962c107521aeb620a9d4b33 Mon Sep 17 00:00:00 2001 From: Andrew Davies Date: Mon, 29 Oct 2018 16:18:30 -0700 Subject: [PATCH] [frdp] Add `includeNonFlutterIsolates` flag. (#23693) Previously there was no way to add this flag when searching for Isolates. --- .../lib/src/fuchsia_remote_connection.dart | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/fuchsia_remote_debug_protocol/lib/src/fuchsia_remote_connection.dart b/packages/fuchsia_remote_debug_protocol/lib/src/fuchsia_remote_connection.dart index 482e313715..2c34a78466 100644 --- a/packages/fuchsia_remote_debug_protocol/lib/src/fuchsia_remote_connection.dart +++ b/packages/fuchsia_remote_debug_protocol/lib/src/fuchsia_remote_connection.dart @@ -287,10 +287,14 @@ class FuchsiaRemoteConnection { /// If there are no live Dart VM's or the Isolate cannot be found, waits until /// either `timeout` is reached, or a Dart VM starts up with a name that /// matches `pattern`. + /// + /// `includeNonFlutterIsolates` can be set to true to include all isolates + /// found instead of just Flutter Isolates. Future> getMainIsolatesByPattern( Pattern pattern, { Duration timeout = _kIsolateFindTimeout, Duration vmConnectionTimeout = _kDartVmConnectionTimeout, + bool includeNonFlutterIsolates = false, }) async { // If for some reason there are no Dart VM's that are alive, wait for one to // start with the Isolate in question. @@ -309,7 +313,10 @@ class FuchsiaRemoteConnection { if (vmService == null) { continue; } - isolates.add(vmService.getMainIsolatesByPattern(pattern)); + isolates.add(vmService.getMainIsolatesByPattern( + pattern, + includeNonFlutterIsolates: includeNonFlutterIsolates, + )); } final List result = await Future.wait>(isolates)