-
Notifications
You must be signed in to change notification settings - Fork 15k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Use message window for requestSingleInstanceLock
- Loading branch information
Showing
7 changed files
with
482 additions
and
244 deletions.
There are no files selected for viewing
648 changes: 420 additions & 228 deletions
648
patches/chromium/feat_add_data_transfer_to_requestsingleinstancelock.patch
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
const { app } = require('electron'); | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
const hasSuffix = app.commandLine.hasSwitch('user-data-dir-suffix'); | ||
|
||
if (!hasSuffix) { | ||
app.exit(2); | ||
} | ||
|
||
const userDataDirSuffix = app.commandLine.getSwitchValue('user-data-dir-suffix'); | ||
|
||
const userDataFolder = path.join(app.getPath('home'), 'electron-test-singleton-userdata-double-' + userDataDirSuffix); | ||
app.setPath('userData', userDataFolder); | ||
|
||
const gotTheLock = app.requestSingleInstanceLock(); | ||
|
||
setTimeout(() => { | ||
app.exit(gotTheLock ? 0 : 1); | ||
}, 500); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "electron-test-singleton-userdata", | ||
"main": "main.js" | ||
} |
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