8000 fix: persist permission granted to serial ports by jkleinsc · Pull Request #30209 · electron/electron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: persist permission granted to serial ports #30209

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 26, 2021
Merged

Conversation

jkleinsc
Copy link
Member

Description of Change

When I implemented web serial in #25237, I did not add logic to persist serial ports that permission has been granted due to complexity in getting ObjectPermissionContextBase working in Electron. This PR fixes that issue by adding functions to ElectronBrowserContext to persist and retrieve saved devices to/from the BrowserContext. These methods will also be used by the forthcoming WebHID implementation.

Fixes #29366

Checklist

Release Notes

Notes: Fixed navigator.serial.getPorts() to return previously selected ports.

@jkleinsc jkleinsc added semver/patch backwards-compatible bug fixes target/12-x-y labels Jul 20, 2021
@electron-cation electron-cation bot added the new-pr 🌱 PR opened recently label Jul 20, 2021
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened recently label Jul 21, 2021
@codebytere codebytere self-requested a review July 21, 2021 16:14
@jkleinsc jkleinsc merged commit 461db8f into main Jul 26, 2021
@jkleinsc jkleinsc deleted the remember-saved-serial branch July 26, 2021 17:10
@release-clerk
Copy link
release-clerk bot commented Jul 26, 2021

Release Notes Persisted

Fixed navigator.serial.getPorts() to return previously selected ports.

@trop
Copy link
Contributor
trop bot commented Jul 26, 2021

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

@trop
Copy link
Contributor
trop bot commented Jul 26, 2021

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

@trop
Copy link
Contributor
trop bot commented Jul 26, 2021

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

@trop
Copy link
Contributor
trop bot commented Jul 26, 2021

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

@jkleinsc jkleinsc mentioned this pull request Jul 27, 2021
5 tasks
georgexu99 pushed a commit to georgexu99/electron that referenced this pull request Jul 29, 2021
@gniezen
Copy link
Contributor
gniezen commented Aug 16, 2021

@jkleinsc Is this fix going to be backported to Electron v12?

BlackHole1 pushed a commit to BlackHole1/electron that referenced this pull request Aug 30, 2021
@codebytere
Copy link
Member

@jkleinsc does this need to get backported or should we remove the labels? I see the 15-x-y bp is still a WIP 🤔

@jkleinsc
Copy link
Member Author
jkleinsc commented Sep 29, 2021

@codebytere #31181 should be backported instead for 15-x-y and 14-x-y. For 12 and 13 I will need to create a separate fix/backport because WebHID will not be backported there.

@trop
Copy link
Contributor
trop bot commented Sep 29, 2021

@jkleinsc has manually backported this PR to "13-x-y", please check out #31190

@trop
Copy link
Contributor
trop bot commented Sep 29, 2021

@jkleinsc has manually backported this PR to "12-x-y", please check out #31193

@gniezen
Copy link
Contributor
gniezen commented Oct 14, 2021

@jkleinsc I just tested this in Electron v12.2.2 and it works great. Thanks again! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: navigator.serial.getPorts() returns an empty list if device is unplugged and replugged
3 participants
0