Fix ParallelWaitError in forEachIsolateHelper during service disconnect (#10074)

`forEachIsolateHelper` used `[for (final isolate in vmIsolates) callback(isolate)].wait`.
In Dart 3, the `Iterable.wait` extension wraps any error from completed futures
in a `ParallelWaitError<V, E>`.

When a target application exits or a VM Service connection is shut down while an
operation is in flight (e.g. periodic polling in `refreshNetworkData`), VM Service
methods like `getSocketProfileWrapper` throw `RPCError: (112) Service has disappeared`.
Callers catch typed errors (e.g., `on RPCError catch (e)` in `network_service.dart` or
`on SentinelException` / `on RPCError` in `service_extension_manager.dart`) and check
`e.isServiceDisposedError` to safely swallow teardown exceptions.

Because `ParallelWaitError` does not inherit from `RPCError` or `Exception`, it bypassed
these typed catch blocks and escaped uncaught, causing flaky integration test failures
in `network_screen_test.dart`.

Using `Future.wait` preserves the underlying exception type thrown by the isolate
callback. Also update `_enableNetworkTrafficRecordingOnAllIsolates` to use `Future.wait`.
6 files changed
tree: a41d7f07ad875560739c0e54915002791b853370
  1. .agents/
  2. .gemini/
  3. .github/
  4. .vscode/
  5. _markdown_images/
  6. docs/
  7. packages/
  8. third_party/
  9. tool/
  10. .gitattributes
  11. .gitignore
  12. AGENTS.md
  13. analysis_options.yaml
  14. AUTHORS
  15. BETA_TESTING.md
  16. CLAUDE.md
  17. CODE_OF_CONDUCT.md
  18. CODEOWNERS
  19. CONTRIBUTING.md
  20. DEBUGGING.md
  21. devtools_options.yaml
  22. DOCUMENTATION.md
  23. flutter-candidate.txt
  24. LICENSE
  25. pubspec.lock
  26. pubspec.yaml
  27. README.md
  28. STYLE.md
  29. TESTING.md
  30. TRIAGE.md
README.md

Dart & Flutter DevTools

Build Status OpenSSF Scorecard

What is this?

Dart & Flutter DevTools is a suite of performance tools for Dart and Flutter.

Getting started

For documentation on installing and trying out DevTools, please see our docs.

Contributing and development

Contributions welcome! See our contributing page for an overview of how to build and contribute to the project.

Terms and Privacy

By using Dart DevTools, you agree to the Google Terms of Service. To understand how we use data collected from this service, see the Google Privacy Policy.