Skip to content

Conversation

rzhao271
Copy link
Contributor

@rzhao271 rzhao271 commented Sep 9, 2021

Description of Change

Fixes #18434
Fixes #23220
Affects microsoft/vscode#97626

This PR adds a new parameter to app.requestSingleInstanceLock() which takes in a JSON object. When a second instance is started and calls that API with an object, the object will be sent from the second instance to the first instance.

CC @deepak1556

Checklist

Release Notes

Notes: add new data parameter to app.requestSingleInstanceLock()

@electron-cation electron-cation bot added the new-pr 🌱 PR opened recently label Sep 9, 2021
@rzhao271 rzhao271 force-pushed the rzhao271/single-instance-serialize branch from e28a18d to aaeb805 Compare September 10, 2021 16:58
@rzhao271 rzhao271 marked this pull request as ready for review September 10, 2021 20:53
@rzhao271 rzhao271 requested a review from a team as a code owner September 10, 2021 20:53
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened recently label Sep 22, 2021
Copy link
Contributor

@zcbenz zcbenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API looks good to me.

@zcbenz
Copy link
Contributor

zcbenz commented Sep 23, 2021

This PR requires review from @electron/wg-upgrades

Copy link
Member

@jkleinsc jkleinsc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just needs some doc cleanup.

@deepak1556 deepak1556 requested a review from jkleinsc October 6, 2021 07:19
@deepak1556
Copy link
Member

@jkleinsc windows ci patch failure seems weird, I am unable to repro it locally. Any idea whats happening there ?

@rzhao271 rzhao271 force-pushed the rzhao271/single-instance-serialize branch from 62f1e14 to 0458026 Compare October 7, 2021 21:06
@jkleinsc
Copy link
Member

API LGTM

@jkleinsc
Copy link
Member

Merging as CI failures are flake unrelated to PR.

@jkleinsc jkleinsc merged commit db0a152 into electron:main Oct 15, 2021
@release-clerk
Copy link

release-clerk bot commented Oct 15, 2021

Release Notes Persisted

add new data parameter to app.requestSingleInstanceLock()

@trop
Copy link
Contributor

trop bot commented Oct 15, 2021

I was unable to backport this PR to "15-x-y" cleanly;
you will need to perform this backport manually.

@trop
Copy link
Contributor

trop bot commented Oct 15, 2021

I have automatically backported this PR to "16-x-y", please check out #31444

t57ser pushed a commit to t57ser/electron that referenced this pull request Oct 27, 2021
…on#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>
t57ser pushed a commit to t57ser/electron that referenced this pull request Oct 27, 2021
…on#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>
t57ser pushed a commit to t57ser/electron that referenced this pull request Oct 29, 2021
…on#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>
t57ser pushed a commit to t57ser/electron that referenced this pull request Oct 29, 2021
…on#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>
t57ser pushed a commit to t57ser/electron that referenced this pull request Oct 29, 2021
…on#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>
t57ser pushed a commit to t57ser/electron that referenced this pull request Oct 29, 2021
…on#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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-review/requested 🗳 semver/minor backwards-compatible functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FR: second-instance event should get the original argv or a custom data second-instance event should pass ENV of requester
4 participants