From 491c4e21382605c4f58823e3db39ee4b14a5a7af Mon Sep 17 00:00:00 2001 From: Andrew Davies Date: Mon, 24 Sep 2018 15:30:49 -0700 Subject: [PATCH] [frdp] Removes regex check for Isolate search. (#22100) This will now make it so that the Dart VM class returns any Isolate that matches the passed Pattern, without checking for any specific strings like "main()" This causes the search to skip over Isolates that would have matched. --- .../fuchsia_remote_debug_protocol/lib/src/dart/dart_vm.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/fuchsia_remote_debug_protocol/lib/src/dart/dart_vm.dart b/packages/fuchsia_remote_debug_protocol/lib/src/dart/dart_vm.dart index 02f22a5026..e12f247d5a 100644 --- a/packages/fuchsia_remote_debug_protocol/lib/src/dart/dart_vm.dart +++ b/packages/fuchsia_remote_debug_protocol/lib/src/dart/dart_vm.dart @@ -118,14 +118,15 @@ class DartVm { /// Returns a [List] of [IsolateRef] objects whose name matches `pattern`. /// - /// Also checks to make sure it was launched from the `main()` function. + /// This is not limited to Isolates running Flutter, but to any Isolate on the + /// VM. Future> getMainIsolatesByPattern(Pattern pattern) async { final Map jsonVmRef = await invokeRpc('getVM', timeout: _kRpcTimeout); final List result = []; for (Map jsonIsolate in jsonVmRef['isolates']) { final String name = jsonIsolate['name']; - if (name.contains(pattern) && name.contains(RegExp(r':main\(\)'))) { + if (name.contains(pattern)) { result.add(IsolateRef._fromJson(jsonIsolate, this)); } }