-
Notifications
You must be signed in to change notification settings - Fork 862
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 BraveBrowserView::OnThemeChanged is called infinitely #924
Conversation
In the below situation, BraveBrowserView::OnThemeChanged() is called infinitely on linux. * Open normal window and private window and change theme * Open normal window and guest/tor window This might be the reason of unresponsiveness of windows icon and cpu spike.
Maybe I couldn't response review comment because of holidays. |
@petemill do you have any other review comments on this? |
Please indicate merge flag |
Approving uplift to @simonhong next time when requesting approval to the |
Fix BraveBrowserView::OnThemeChanged is called infinitely
Fix BraveBrowserView::OnThemeChanged is called infinitely
bbondy [4:58 PM] trying to get tests working on 0.58.x and noticed this is failing for tests: #924 I noticed this is in 0.57.x and 0.58.x but it needs a dependency for which was added with this f929cbc now I'm just going to add the dep for now ,but I want to make sure this is not a problem and check in case we needed the other PR in those branches too or to revert 924 from them petemill [5:04 PM] hmm good spot. I don't think there is anything else that makes 924 depend on 774. We probably don't need 774 on 0.57 as it's not urgent. I don't know how urgent 924 is but it sounds like it could be if it was causing an infinite loop. So safest is probably to add the dep. bbondy [5:06 PM] great thx for confirming, added the dep
bbondy [4:58 PM] trying to get tests working on 0.58.x and noticed this is failing for tests: #924 I noticed this is in 0.57.x and 0.58.x but it needs a dependency for which was added with this f929cbc now I'm just going to add the dep for now ,but I want to make sure this is not a problem and check in case we needed the other PR in those branches too or to revert 924 from them petemill [5:04 PM] hmm good spot. I don't think there is anything else that makes 924 depend on 774. We probably don't need 774 on 0.57 as it's not urgent. I don't know how urgent 924 is but it sounds like it could be if it was causing an infinite loop. So safest is probably to add the dep. bbondy [5:06 PM] great thx for confirming, added the dep
Fix brave/brave-browser#1643
Fix brave/brave-browser#1791
In the below situation, BraveBrowserView::OnThemeChanged() is called
infinitely on linux.
This might be the reason of unresponsiveness of windows icon and
cpu spike.
Instead of notifying to native theme observer in
BraveThemeService::OnThemeChanged()
,BraveThemeService::OnPreferenceChanged()
would be much better to prevent infiniteOnThemeChanged()
calling.Submitter Checklist:
npm test brave_unit_tests && npm test brave_browser_tests
) ongit rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
yarn test brave_browser_tests --filter=BraveThemeServiceTest.NativeThemeObserverTest
Reviewer Checklist: