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 a crash during execution context detection #2286

Merged

Conversation

annagrin
Copy link
Contributor

@annagrin annagrin commented Nov 8, 2023

Tolerate failure to detect a dart execution context ID:

  • make ExecutionContext.id return null if ID is not found instead of throwing
  • remember already processed contexts and retry them next time ExecutionContext.id is called
    • succeeds in case injected client is loaded later
  • add tests

Closes: #2284

@annagrin annagrin requested a review from elliette November 8, 2023 19:59
@elliette
Copy link
Contributor

elliette commented Nov 8, 2023

I might be misunderstanding the issue, but I wonder if we could use a completer to notify when the injected client has loaded, and await it being loaded before we try to get the execution context during a hot restart.

@annagrin annagrin requested a review from elliette November 9, 2023 01:04
@annagrin annagrin merged commit 6961b20 into dart-lang:master Nov 9, 2023
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.

Debugging features are broken after a reload due to missing execution context
2 participants