[ DDS ] Fix IsolateManager.initialize() not correctly handling Sentinel responses

Fixes https://github.com/flutter/flutter/issues/111482

Change-Id: I11eff2c140ea621550f33e2ddf0ab8092e9248db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259400
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
This commit is contained in:
Ben Konyi 2022-09-15 13:56:43 +00:00 committed by Commit Bot
parent f553f0aad9
commit db6311beca
2 changed files with 6 additions and 0 deletions

View file

@ -2,6 +2,7 @@
- [DAP] Removed an unused parameter `resumeIfStarting` from `DartDebugAdapter.connectDebugger`.
- [DAP] Fixed some issues where removing breakpoints could fail if an isolate exited during an update or multiple client breakpoints mapped to the same VM breakpoint.
- [DAP] Paths provided to DAP now always have Windows drive letters normalized to uppercase to avoid some issues where paths may be treated case sensitively.
- Fixed issue where DDS wasn't correctly handling `Sentinel` responses in `IsolateManager.initialize()`.
# 2.2.6
- Fixed an issue where debug adapters would not automatically close after terminating/disconnecting from the debugee.

View file

@ -226,6 +226,11 @@ class IsolateManager {
final isolate = await dds.vmServiceClient.sendRequest('getIsolate', {
'isolateId': id,
});
// If the isolate has shutdown after the getVM request, ignore it and
// continue to the next isolate.
if (isolate['kind'] == 'Sentinel') {
continue;
}
final name = isolate['name'];
if (isolate.containsKey('pauseEvent')) {
isolates[id] = _RunningIsolate(this, id, name);