-
Notifications
You must be signed in to change notification settings - Fork 29.7k
[CP-stable] When shutting down chrome, guard the call to ChromeConnection.getTab
#154380
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
[CP-stable] When shutting down chrome, guard the call to ChromeConnection.getTab
#154380
Conversation
| expect(commands, contains('Browser.close')); | ||
| }); | ||
|
|
||
| testWithoutContext('chrome.close can recover if getTab throws an HttpException', () async { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do these tests verify the change you're making? I tried reverting your change to packages/flutter_tools/lib/src/web/chrome.dart, and it seems like these tests still pass. LMK if that's unexpected, I may have messed up my git foo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is unexpected. I think I can fix this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coming back to this, the test you highlighted here (chrome.close can recover if getTab throws an HttpException) doesn't verify this change because it doesn't throw the exception from another zone. I personally don't know how to simulate this, so I tempted to simply remove this test.
The other test (chrome.close can recover if getTab throws a StateError) was indeed non-functional and fixed in master by #154889. I've copied the changes to this PR.
christopherfujino
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…omeConnection.getTab` (flutter/flutter#154380)
…omeConnection.getTab` (flutter/flutter#154380)
…omeConnection.getTab` (flutter/flutter#154380)
…er#155044) # Flutter stable 3.24.3 Framework ## Scheduled Cherrypicks - flutter#154380 - flutter#154720 - flutter#154944
This is a custom hotfix patch to fix #154366 and #153064 on the stable channel. The reason for a custom patch rather than a bot-created PR is that the fixes on master were done by two sequential PRs (#153978 and #154366). This CP patch is also a subset of those changes (calls to Chrome when shutting down at the end of
flutter run -d chrome).Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.