Skip to content

fix: use powerMonitor.on() only after app is ready#21941

Merged
zcbenz merged 4 commits into7-1-xfrom
trop/7-1-x-bp-fix-use-powermonitor-on-only-after-app-is-ready-1580235601272
Jan 29, 2020
Merged

fix: use powerMonitor.on() only after app is ready#21941
zcbenz merged 4 commits into7-1-xfrom
trop/7-1-x-bp-fix-use-powermonitor-on-only-after-app-is-ready-1580235601272

Conversation

@trop
Copy link
Contributor

@trop trop bot commented Jan 28, 2020

Backport of #21927

See that PR for details.

Notes: Fixed error thrown when importing powerMonitor on Linux before app's 'ready' event.

ckerr added 4 commits January 28, 2020 18:20
powerMonitor can't be used until the app is ready; however, on Linux,
powerMonitor.on() was called as soon as lib/browser/api/power-monitor.ts
was loaded.

This patch takes @vladimiry's suggestion of wrapping that in an
app.on('ready') handler to prevent powerMonitor.on() from being called
prematurely.

Fixes #21716
Fix the previous commit's app-is-ready handler by checking to see if
app is already ready when power-monitor.ts is loaded.
@electron-cation electron-cation bot added the new-pr 🌱 PR opened recently label Jan 28, 2020
@trop trop bot requested a review from ckerr January 28, 2020 18:20
@trop trop bot added 7-1-x backport This is a backport PR labels Jan 28, 2020
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened recently label Jan 28, 2020
@zcbenz zcbenz merged commit 570e4f6 into 7-1-x Jan 29, 2020
@release-clerk
Copy link

release-clerk bot commented Jan 29, 2020

Release Notes Persisted

Fixed error thrown when importing powerMonitor on Linux before app's 'ready' event.

@zcbenz zcbenz deleted the trop/7-1-x-bp-fix-use-powermonitor-on-only-after-app-is-ready-1580235601272 branch January 29, 2020 09:45
tessus added a commit to tessus/joplin that referenced this pull request Feb 8, 2020
This is only a minor bump but several issues have been fixed since 7.1.9:

- Fixed an edge case in checkbox logic on Windows. electron/electron#21860
- Fixed an issue where window.print() only worked once on a single BrowserWindow. electron/electron#21911
- Fixed an issue where the credits set in About Panel credits were not dark mode aware on macOS. electron/electron#21924
- Fixed error thrown when importing powerMonitor on Linux before app's 'ready' event. electron/electron#21941
- Fixed fuzzy font rendering when hot-plugging displays on macOS Catalina. electron/electron#21872
- Fixed BrowserWindow.setFocusable(true) not working on Windows. electron/electron#21855
- Fixed set-cookie header not passed in net module. electron/electron#21770
- Fixed an issue where custom stream protocols would sometimes not complete responses when the data stream ended. electron/electron#21758
- Fixed crash when restoring minimized hidden window on Windows. electron/electron#21820
- Fixed issue where non-zero size pixels in CSS styles could be rounded down to zero size pixels. electron/electron#21857
- Fixed memory leak when using javascript generator functions. electron/electron#21773
- Fixed potential hang when sending synchronous IPC messages on process shutdown. electron/electron#21776
tessus added a commit to tessus/joplin that referenced this pull request Feb 12, 2020
This is only a minor bump but several issues have been fixed since 7.1.9:

- Fixed an issue where sending complex objects over IPC could in some cases cause the renderer process to be terminated. electron/electron#21922
- Fixed crash with Date.toLocaleString for invalid locale and locale of the format aa@BB. electron/electron#21969
- Fixed flash plugin not working. electron/electron#22109
- Fixed issue where renderers could crash during GC when using the contextBridge module. electron/electron#22112
- Fixed netLog.stopLogging returning undefined instead of the path to the log. electron/electron#21988
- Fixed an edge case in checkbox logic on Windows. electron/electron#21860
- Fixed an issue where window.print() only worked once on a single BrowserWindow. electron/electron#21911
- Fixed an issue where the credits set in About Panel credits were not dark mode aware on macOS. electron/electron#21924
- Fixed error thrown when importing powerMonitor on Linux before app's 'ready' event. electron/electron#21941
- Fixed fuzzy font rendering when hot-plugging displays on macOS Catalina. electron/electron#21872
- Fixed BrowserWindow.setFocusable(true) not working on Windows. electron/electron#21855
- Fixed set-cookie header not passed in net module. electron/electron#21770
- Fixed an issue where custom stream protocols would sometimes not complete responses when the data stream ended. electron/electron#21758
- Fixed crash when restoring minimized hidden window on Windows. electron/electron#21820
- Fixed issue where non-zero size pixels in CSS styles could be rounded down to zero size pixels. electron/electron#21857
- Fixed memory leak when using javascript generator functions. electron/electron#21773
- Fixed potential hang when sending synchronous IPC messages on process shutdown. electron/electron#21776
laurent22 pushed a commit to laurent22/joplin that referenced this pull request Feb 13, 2020
This is only a minor bump but several issues have been fixed since 7.1.9:

- Fixed an issue where sending complex objects over IPC could in some cases cause the renderer process to be terminated. electron/electron#21922
- Fixed crash with Date.toLocaleString for invalid locale and locale of the format aa@BB. electron/electron#21969
- Fixed flash plugin not working. electron/electron#22109
- Fixed issue where renderers could crash during GC when using the contextBridge module. electron/electron#22112
- Fixed netLog.stopLogging returning undefined instead of the path to the log. electron/electron#21988
- Fixed an edge case in checkbox logic on Windows. electron/electron#21860
- Fixed an issue where window.print() only worked once on a single BrowserWindow. electron/electron#21911
- Fixed an issue where the credits set in About Panel credits were not dark mode aware on macOS. electron/electron#21924
- Fixed error thrown when importing powerMonitor on Linux before app's 'ready' event. electron/electron#21941
- Fixed fuzzy font rendering when hot-plugging displays on macOS Catalina. electron/electron#21872
- Fixed BrowserWindow.setFocusable(true) not working on Windows. electron/electron#21855
- Fixed set-cookie header not passed in net module. electron/electron#21770
- Fixed an issue where custom stream protocols would sometimes not complete responses when the data stream ended. electron/electron#21758
- Fixed crash when restoring minimized hidden window on Windows. electron/electron#21820
- Fixed issue where non-zero size pixels in CSS styles could be rounded down to zero size pixels. electron/electron#21857
- Fixed memory leak when using javascript generator functions. electron/electron#21773
- Fixed potential hang when sending synchronous IPC messages on process shutdown. electron/electron#21776
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

7-1-x backport This is a backport PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants