Skip to content

Commit

Permalink
SDA-4757 - Add safety check for chrome flags & wait for app ready for…
Browse files Browse the repository at this point in the history
… dialog
  • Loading branch information
KiranNiranjan committed Dec 23, 2024
1 parent 421e5c4 commit ad79f42
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/app/chrome-flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ export const setChromeFlags = () => {
]) as any;
const configFlags: object = {
'auth-negotiate-delegate-whitelist':
flagsConfig.customFlags.authNegotiateDelegateWhitelist,
'auth-server-whitelist': flagsConfig.customFlags.authServerWhitelist,
flagsConfig.customFlags?.authNegotiateDelegateWhitelist,
'auth-server-whitelist': flagsConfig.customFlags?.authServerWhitelist,
'disable-background-timer-throttling': 'true',
'disable-d3d11': true,
'disable-gpu': flagsConfig.disableGpu || null,
'disable-gpu-compositing': flagsConfig.disableGpu || null,
'disable-gpu': flagsConfig?.disableGpu || null,
'disable-gpu-compositing': flagsConfig?.disableGpu || null,
'enable-blink-features': 'RTCInsertableStreams',
'disable-features': 'ChromeRootStoreUsed',
};
if (
flagsConfig.customFlags.disableThrottling ===
flagsConfig.customFlags?.disableThrottling ===
CloudConfigDataTypes.ENABLED ||
disableThrottling === CloudConfigDataTypes.ENABLED
) {
Expand Down
2 changes: 1 addition & 1 deletion src/app/config-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export interface IConfig {
autoLaunchPath: string;
userDataPath: string;
permissions: IPermission;
customFlags: ICustomFlag;
customFlags?: ICustomFlag;
buildNumber?: string;
configVersion?: string;
notificationSettings: INotificationSetting;
Expand Down
3 changes: 2 additions & 1 deletion src/app/window-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ export class WindowHandler {
// Handle uncaught exception and terminate application
process.on('uncaughtException', async (error) => {
logger.error('window-handler: uncaught exception', error);
await app.whenReady();
const messageBoxOptions: MessageBoxSyncOptions = {
type: 'question',
title: i18n.t('Relaunch Application')(),
Expand Down Expand Up @@ -281,7 +282,7 @@ export class WindowHandler {
this.contextIsolation = this.globalConfig.contextIsolation;
}
this.backgroundThrottling =
customFlags.disableThrottling !== CloudConfigDataTypes.ENABLED ||
customFlags?.disableThrottling !== CloudConfigDataTypes.ENABLED ||
disableThrottling !== CloudConfigDataTypes.ENABLED;
this.isCustomTitleBar =
isWindowsOS &&
Expand Down

0 comments on commit ad79f42

Please sign in to comment.