electron/shell
Samuel Attard 139d2998b1
fix: propagate requesting frame through sync permission checks (#50719)
fix: propagate requesting frame through sync permission checks (#50679)

WebContentsPermissionHelper::CheckPermission was hardcoding
GetPrimaryMainFrame() and deriving the requesting origin from
web_contents_->GetLastCommittedURL(), so the setPermissionCheckHandler
callback always received the top frame's origin and
details.isMainFrame/details.requestingUrl always reflected the main
frame, even when a cross-origin subframe with allow="serial" or
allow="camera; microphone" triggered the check.

Thread the requesting RenderFrameHost through CheckPermission,
CheckSerialAccessPermission, and CheckMediaAccessPermission so the
permission manager receives the real requesting frame. Update the
serial delegate and WebContents::CheckMediaAccessPermission callers to
pass the frame they already have.

Adds a regression test that loads a cross-origin iframe with
allow="camera; microphone", calls enumerateDevices() from within the
iframe, and asserts the permission check handler receives the iframe
origin for requestingOrigin, isMainFrame, and requestingUrl.
2026-04-06 11:50:52 -04:00
..
app refactor: address PathProvider TODO (#49601) 2026-02-02 09:39:20 +01:00
browser fix: propagate requesting frame through sync permission checks (#50719) 2026-04-06 11:50:52 -04:00
common fix: defer Wrappable destruction in SecondWeakCallback to a posted task (#50693) 2026-04-05 09:28:59 +00:00
renderer feat: make Chrome extensions work on custom protocols (#50588) 2026-04-02 20:10:04 -07:00
services/node fix: revert enabling WASM trap handlers in all Node.js processes (#48976) 2025-11-14 18:57:05 -08:00
utility fix: broken OOP window.print() on macOS/Linux (#45214) 2025-01-20 10:23:44 +01:00