[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.
This commit is contained in:
@@ -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<List<IsolateRef>> getMainIsolatesByPattern(Pattern pattern) async {
|
||||
final Map<String, dynamic> jsonVmRef =
|
||||
await invokeRpc('getVM', timeout: _kRpcTimeout);
|
||||
final List<IsolateRef> result = <IsolateRef>[];
|
||||
for (Map<String, dynamic> 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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user