ELECTRON-530: add chrome flag to disable background timer throttling (#396)

- add chrome flag to disable background timer throttling
- remove double hyphen while setting flag for consistency
This commit is contained in:
Vishwas Shashidhar 2018-06-12 21:44:11 +05:30 committed by GitHub
parent a52c46bb6e
commit 47ac213477
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -118,7 +118,7 @@ if (isMac) {
*/
function setChromeFlags() {
log.send(logLevels.INFO, 'checking if we need to set custom chrome flags!');
log.send(logLevels.INFO, 'setting chrome flags!');
// Read the config parameters synchronously
let config = readConfigFileSync();
@ -126,8 +126,6 @@ function setChromeFlags() {
// If we cannot find any config, just skip setting any flags
if (config && config !== null && config.customFlags) {
log.send(logLevels.INFO, 'Chrome flags config found!');
if (config.customFlags.authServerWhitelist && config.customFlags.authServerWhitelist !== "") {
log.send(logLevels.INFO, 'Setting auth server whitelist flag');
app.commandLine.appendSwitch('auth-server-whitelist', config.customFlags.authServerWhitelist);
@ -149,6 +147,8 @@ function setChromeFlags() {
}
}
app.commandLine.appendSwitch("disable-background-timer-throttling", true);
}
// Set the chrome flags