mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 19:40:29 +00:00
5536951738
This change reworks the client resume permissions API to make it easier for clients to deal with user provided `--pause-isolates-on-start` and `--pause-isolates-on-exit` flags. `requireUserPermissionToResume` should be called by the tool that launches the Dart process to indicate whether or not the user provided `--pause-isolates-on-{start,exit}`. The default behavior is to assume that a tool set these flags for its own use (e.g., resetting breakpoints after a hot restart in Flutter), where isolates will resume immediately after each client that has indicated interest in that pause event has invoked `readyToResume`. If a user provided one of the previously mentioned flags, isolates will not immediately resume after each relevant client has invoked `readyToResume`. Instead, a call to `resume()` must be made to indicate the user has triggered the resume request instead of tooling. If the user permissions to resume are changed while the isolate is paused and all relevant clients have invoked `readyToResume`, the isolate will automatically resume if the user no longer requires us to wait for a user resume. `resume()` now also acts as a "force resume", bypassing any required permissions set by tooling. This behavior change is breaking, so the DDS protocol version is being bumped to 2.0. `package:dds_service_extensions` has also been updated to include the following DDS RPCs: - `requireUserPermissionToResume` - `readyToResume` Change-Id: Id5f0806b3c56507d39eb00b6305b8896bab13ae7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/357420 Reviewed-by: Elliott Brooks <elliottbrooks@google.com> Commit-Queue: Ben Konyi <bkonyi@google.com> |
||
---|---|---|
.. | ||
dap.dart | ||
dds_service_extensions.dart |