feat: Add data parameter to app.requestSingleInstanceLock() (#30891)

* WIP

* Use serialization

* Rebase windows impl of new app requestSingleInstanceLock parameter

* Fix test

* Implement posix side

* Add backwards compatibility test

* Apply PR feedback Windows

* Fix posix impl

* Switch mac impl back to vector

* Refactor Windows impl

* Use vectors, inline make_span

* Use blink converter

* fix: ownership across sequences

* Fix upstream merge from Chromium

Co-authored-by: deepak1556 <hop2deep@gmail.com>
This commit is contained in:
Raymond Zhao 2021-10-14 18:32:32 -07:00 committed by GitHub
parent 5592652504
commit db0a152bc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 442 additions and 22 deletions

View file

@ -6,9 +6,9 @@ app.whenReady().then(() => {
const gotTheLock = app.requestSingleInstanceLock();
app.on('second-instance', (event, args) => {
app.on('second-instance', (event, args, workingDirectory, data) => {
setImmediate(() => {
console.log(JSON.stringify(args));
console.log([JSON.stringify(args), JSON.stringify(data)].join('||'));
app.exit(0);
});
});