Repository navigation
fix: report the requesting frame for hid and usb permission checks - #53679
Merged
Conversation
ElectronHidDelegate and ElectronUsbDelegate ran the hid/usb permission check with a null frame and the origin content handed them, so session.setPermissionCheckHandler saw the top-level document's origin, no requestingUrl, isMainFrame false and a null webContents for a check made from a subframe, while the chooser controllers already store the grant under the requesting frame's origin. Carry https://crrev.com/c/8364427 so CanRequestDevicePermission() receives the frame, key HidService/WebUsbServiceImpl on the requesting frame's origin so grant, check and forget() agree, and pass the frame into CheckPermissionWithDetails, matching serial and media. Co-authored-by: Samuel Attard <[email protected]>
4 tasks done
MarshallOfSound
approved these changes
Sep 7, 2026
MarshallOfSound
enabled auto-merge (squash)
September 7, 2026 15:47
MarshallOfSound
deleted the
trop/45-x-y-bp-fix-report-the-requesting-frame-for-hid-and-usb-permission-checks-1788795962489
branch
September 7, 2026 17:47
|
Release Notes Persisted
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #53656
See that PR for details.
Notes: Fixed
session.setPermissionCheckHandlerreceiving the top-level origin and a nullwebContentsforhidandusbchecks made from a subframe.