-
Notifications
You must be signed in to change notification settings - Fork 905
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
Fixed tab crash when tab is closed from context menu #21397
Conversation
7bffe45
to
08ec5ec
Compare
08ec5ec
to
793b2f6
Compare
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
@@ -47,7 +48,9 @@ BraveTabContextMenuContents::BraveTabContextMenuContents( | |||
TabRestoreServiceFactory::GetForProfile(browser_->profile()); | |||
menu_runner_ = std::make_unique<views::MenuRunner>( | |||
model_.get(), | |||
views::MenuRunner::HAS_MNEMONICS | views::MenuRunner::CONTEXT_MENU); | |||
views::MenuRunner::HAS_MNEMONICS | views::MenuRunner::CONTEXT_MENU, | |||
base::BindRepeating(&BraveTabContextMenuContents::OnMenuClosed, |
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.
How about resetting context_menu_contents_
in BraveBrowserTabStripController` with this callback?
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.
Good suggestion! I'll try to refactor in that way after PTO.
Verification PASSED on
Reproduced the original issue using Verified that the crash doesn't occur once |
fix brave/brave-browser#34909
Resolves
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
wikinpm run lint
,npm run presubmit
wiki,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan:
Note: I only can repro this crash with below steps on macOS.
Close other tabs
cmd + ,