commit | 6cfe0a7f24d8ccd6148763f597940dea6c9367b8 | [log] [tgz] |
---|---|---|
author | Nafis Abedin <nafisabedin@google.com> | Tue Dec 10 14:54:34 2024 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Dec 10 14:54:34 2024 |
tree | 4aee81a10d31aab5d34ec9111493a2b1defe7e55 | |
parent | 611e28b56aea46b142d3dffcb1eb993b6ccda5c1 [diff] |
[Power Saving Mode] Fix Canary crash caused by ObserverList in BG ObserverList is not thread-safe, so if Power Saving Mode changes status before the receiver has been registered, observers will try to be notified from a BG thread which will cause a crash. Moved notifying the observers to the UI thread if not currently on it. This should be a very small percentage of cases; we should mainly already be on the UI thread when updatePowerSaveMode() is called. Also bumped up priority to USER_VISIBLE, as dark theme turns on if the user is using light theme and turns on Power Saving Mode. Testing: Reproduced the crash by adding in an ablation before registration and verified this fixes the issue. Bug: 382603574 Change-Id: I9bb43fea6527d7f98dc2d8c0640787f36d9299b9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6078132 Reviewed-by: Theresa Sullivan <twellington@chromium.org> Commit-Queue: Nafis Abedin <nafisabedin@google.com> Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com> Reviewed-by: Yaron Friedman <yfriedman@chromium.org> Cr-Commit-Position: refs/heads/main@{#1394263}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.