Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix reading pause_isolates_on_start value from the DWDS #2398

Merged
merged 2 commits into from
Mar 27, 2024

Conversation

elliette
Copy link
Contributor

Follow up to #2373

The debugConnection method (in which we were listening to the pauseIsolatesOnStartStream) is actually only called from test code. 🤦‍♀️

This allows us to actually access the pause_isolates_on_start flag value in the Dwds class.

Work towards flutter/devtools#7231

@@ -121,6 +121,9 @@ class DevHandler {
_servicesByAppId.clear();
}();

bool shouldPauseIsolatesOnStart(String appId) =>
_servicesByAppId[appId]?.chromeProxyService.pauseIsolatesOnStart ?? false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar with this part - when do we expect _servicesByAppId[appId] to be null?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_servicesByAppId[appId] is null when the debug session has been closed (which is exactly what we want, because that means shouldPauseIsolatesOnStart will return false and the code runner which calls this won't wait for a resume event

@elliette elliette merged commit 4067462 into dart-lang:master Mar 27, 2024
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants