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
This commit is contained in:
Samuel Attard 2019-09-16 16:08:01 -07:00 committed by GitHub
parent 2b316f3843
commit 0e61709fa7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 31 additions and 12 deletions

View file

@ -38,6 +38,7 @@ class NativeTheme : public mate::EventEmitter<NativeTheme>,
// ui::NativeThemeObserver:
void OnNativeThemeUpdated(ui::NativeTheme* theme) override;
void OnNativeThemeUpdatedOnUI();
private:
ui::NativeTheme* theme_;