Skip to content

debugger: if controller has been disposed, leave showScriptLocation early - #9884

Merged
srawlins merged 2 commits into
flutter:masterfrom
srawlins:dispose-debugger
Jul 10, 2026
Merged

debugger: if controller has been disposed, leave showScriptLocation early#9884
srawlins merged 2 commits into
flutter:masterfrom
srawlins:dispose-debugger

Conversation

@srawlins

@srawlins srawlins commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

This was discovered by Gemini when I asked it to look through integration tests for causes of flakiness.

@srawlins

srawlins commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

WDYT, @bkonyi ?

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request adds a check to verify if the CodeViewController has been disposed after an asynchronous operation before updating the scripts history. The reviewer points out that this check is too late to prevent exceptions from modifying other disposed ValueNotifiers inside _showScriptLocation and refreshCodeStatistics(), and suggests adding disposed checks immediately after the asynchronous calls in those methods.

@bkonyi

bkonyi commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

WDYT, @bkonyi ?

Makes sense to me! Asynchronous gaps are nefarious!

@srawlins
srawlins merged commit f6ba7b4 into flutter:master Jul 10, 2026
51 checks passed
@srawlins
srawlins deleted the dispose-debugger branch July 10, 2026 17:08
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.

2 participants