Unverified Commit b722a744 authored by Andrew Davies's avatar Andrew Davies Committed by GitHub

[frdp] Add `includeNonFlutterIsolates` flag. (#23693)

Previously there was no way to add this flag when searching for
Isolates.
parent 94655330
...@@ -287,10 +287,14 @@ class FuchsiaRemoteConnection { ...@@ -287,10 +287,14 @@ class FuchsiaRemoteConnection {
/// If there are no live Dart VM's or the Isolate cannot be found, waits until /// 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 /// either `timeout` is reached, or a Dart VM starts up with a name that
/// matches `pattern`. /// matches `pattern`.
///
/// `includeNonFlutterIsolates` can be set to true to include all isolates
/// found instead of just Flutter Isolates.
Future<List<IsolateRef>> getMainIsolatesByPattern( Future<List<IsolateRef>> getMainIsolatesByPattern(
Pattern pattern, { Pattern pattern, {
Duration timeout = _kIsolateFindTimeout, Duration timeout = _kIsolateFindTimeout,
Duration vmConnectionTimeout = _kDartVmConnectionTimeout, Duration vmConnectionTimeout = _kDartVmConnectionTimeout,
bool includeNonFlutterIsolates = false,
}) async { }) async {
// If for some reason there are no Dart VM's that are alive, wait for one to // If for some reason there are no Dart VM's that are alive, wait for one to
// start with the Isolate in question. // start with the Isolate in question.
...@@ -309,7 +313,10 @@ class FuchsiaRemoteConnection { ...@@ -309,7 +313,10 @@ class FuchsiaRemoteConnection {
if (vmService == null) { if (vmService == null) {
continue; continue;
} }
isolates.add(vmService.getMainIsolatesByPattern(pattern)); isolates.add(vmService.getMainIsolatesByPattern(
pattern,
includeNonFlutterIsolates: includeNonFlutterIsolates,
));
} }
final List<IsolateRef> result = final List<IsolateRef> result =
await Future.wait<List<IsolateRef>>(isolates) await Future.wait<List<IsolateRef>>(isolates)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment