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: emit updated on NativeTheme on the UI thread to avoid DCHECK #20137
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MarshallOfSound
force-pushed
the
emit-native-theme-on-ui
branch
from
September 5, 2019 19:37
35a1d0a
to
98a8238
Compare
codebytere
reviewed
Sep 5, 2019
seems this change broke the spec |
miniak
approved these changes
Sep 12, 2019
Now the event is async so the previous logic that relied on it being sync doesn't work. Lemme hack around it a bit |
MarshallOfSound
force-pushed
the
emit-native-theme-on-ui
branch
from
September 16, 2019 21:47
98a8238
to
cd57ed0
Compare
No Release Notes |
I was unable to backport this PR to "7-0-x" cleanly; |
MarshallOfSound
added a commit
that referenced
this pull request
Oct 8, 2019
…0137) * fix: emit updated on NativeTheme on the UI thread to avoid DCHECK * Update atom_api_native_theme.cc * spec: wait a few ticks for async events to emit so that test events do not leak into each other
jkleinsc
pushed a commit
that referenced
this pull request
Oct 8, 2019
* feat: add nativeTheme.themeSource to allow apps to override Chromiums theme choice (#19960) * feat: add nativeTheme.shouldUseDarkColorsOverride to allow apps to override Chromiums theme choice * spec: add tests for shouldUseDarkColorsOverride * chore: add missing forward declarations * refactor: rename overrideShouldUseDarkColors to themeSource * chore: only run appLevelAppearance specs on Mojave and up * chore: update patch with more info and no define * Update spec-main/api-native-theme-spec.ts Co-Authored-By: Jeremy Apthorp <jeremya@chromium.org> * Update api-native-theme-spec.ts * Update api-native-theme-spec.ts * Update api-native-theme-spec.ts * fix: don't expose nativeTheme in the renderer process (#20139) Exposing these in the renderer didn't make sense as they weren't backed by the same instance / value store. This API should be browser only especially now that we have nativeTheme.themeSource. Exposing in //common was a mistake from the beginning. * fix: emit updated on NativeTheme on the UI thread to avoid DCHECK (#20137) * fix: emit updated on NativeTheme on the UI thread to avoid DCHECK * Update atom_api_native_theme.cc * spec: wait a few ticks for async events to emit so that test events do not leak into each other * chore: add SetGTKDarkThemeEnabled(enabled) internal helper to allow dynamic theme selection on linux (#19964) This is just a after-creation setter for the `darkTheme` constructor option. This is delibrately a method and not a property as there is no getter. * spec: remove leftover .only
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Found while experimenting locally, this
OnNativeThemeUpdated
call can come from any thread apparently so let's post it to the UI thread.,Related to #19932
Notes: no-notes