electron/shell/browser
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
..
api fix: propagate requesting frame through sync permission checks (#50719) 2026-04-06 11:50:52 -04:00
badging chore: bump chromium to 133.0.6920.0 (main) (#45055) 2025-01-10 10:52:34 -06:00
bluetooth chore: bump chromium to 139.0.7256.0 (main) (#47481) 2025-06-26 00:12:49 +09:00
extensions chore: bump chromium to 144.0.7547.0 (40-x-y) (#49146) 2025-12-05 12:18:13 -05:00
file_system_access fix: resolve getFileHandle concurrent stalling by queuing callbacks (#50672) 2026-04-03 13:48:01 -05:00
hid fix: use requesting frame origin in permission helper and device choosers (#50149) 2026-03-09 23:03:45 -05:00
lib chore: bump chromium to 141.0.7346.0 (main) (#47983) 2025-08-11 12:57:31 +09:00
linux fix: screen.getCursorScreenPoint() crash on Wayland (#50104) 2026-03-09 12:33:49 +01:00
mac fix: deliver Universal Links when NSUserActivity.userInfo is nil (#50005) 2026-03-02 19:12:08 -05:00
media chore: iwyu mojom-forward header files (#43741) 2024-09-17 12:58:56 -07:00
net fix: validate response header names and values before AddHeader (#50131) 2026-03-09 11:36:34 +01:00
notifications fix: outdated execution path for COM activation (#50518) 2026-03-26 20:19:14 +00:00
osr fix: bind offscreen paint callback to child WebContents (#50024) 2026-03-03 10:43:08 +01:00
plugins fix: compilation error when disabling extensions and pdf_viewer (#47964) 2025-08-07 11:18:32 -04:00
printing fix: fall back to default DPI when GTK returns 0 on Linux (#50488) 2026-03-26 11:47:34 -04:00
resources fix: address upstream Chromium shift to enable CoreAudio Tap API for audio capture used in electron's desktopCapturer (🍏 macOS). (#49741) 2026-02-13 16:27:51 +01:00
serial fix: propagate requesting frame through sync permission checks (#50719) 2026-04-06 11:50:52 -04:00
ui fix: re-enable MacWebContentsOcclusion with embedder window fix (#50713) 2026-04-06 10:14:32 -04:00
usb fix: use requesting frame origin in permission helper and device choosers (#50149) 2026-03-09 23:03:45 -05:00
webauthn chore: bump chromium to 134.0.6988.0 (main) (#45334) 2025-02-06 15:30:54 -05:00
win chore: bump chromium to 142.0.7417.0 (main) (#48275) 2025-09-22 20:16:27 -07:00
animation_util.h feat: replace BrowserView with WebContentsView (#35658) 2023-12-13 13:01:03 -08:00
animation_util_mac.mm feat: replace BrowserView with WebContentsView (#35658) 2023-12-13 13:01:03 -08:00
auto_updater.cc chore: bump chromium to 141.0.7390.7 (main) (#48212) 2025-09-08 12:57:15 +02:00
auto_updater.h chore: bump chromium to 141.0.7390.7 (main) (#48212) 2025-09-08 12:57:15 +02:00
auto_updater_mac.mm refactor: prefer upstream gin::Arguments::ThrowTypeError() over gin_helper (#48368) 2025-09-24 19:10:05 -05:00
background_throttling_source.h fix: disable background throttling also in the viz::DisplayScheduler (#38924) 2023-09-26 16:00:46 -04:00
browser.cc fix: validate protocol scheme names in setAsDefaultProtocolClient (#50158) 2026-03-10 00:04:27 -05:00
browser.h fix: validate protocol scheme names in setAsDefaultProtocolClient (#50158) 2026-03-10 00:04:27 -05:00
browser_linux.cc fix: validate protocol scheme names in setAsDefaultProtocolClient (#50158) 2026-03-10 00:04:27 -05:00
browser_mac.mm fix: validate protocol scheme names in setAsDefaultProtocolClient (#50158) 2026-03-10 00:04:27 -05:00
browser_observer.h fix: modernize-use-equals-default warnings (#44935) 2024-12-03 16:25:48 -06:00
browser_process_impl.cc fix: revert os_crypt async cookie provider implementation (#49384) 2026-01-14 19:24:45 +01:00
browser_process_impl.h chore: bump chromium to 144.0.7547.0 (40-x-y) (#49146) 2025-12-05 12:18:13 -05:00
browser_win.cc fix: validate protocol scheme names in setAsDefaultProtocolClient (#50158) 2026-03-10 00:04:27 -05:00
certificate_manager_model.cc chore: bump chromium to 144.0.7547.0 (40-x-y) (#49146) 2025-12-05 12:18:13 -05:00
certificate_manager_model.h chore: more iwyu (#43063) 2024-07-29 12:42:57 -05:00
child_web_contents_tracker.cc chore: bump chromium to 143.0.7474.0 (main) (#48572) 2025-10-17 13:04:24 -04:00
child_web_contents_tracker.h chore: bump chromium to 143.0.7474.0 (main) (#48572) 2025-10-17 13:04:24 -04:00
cookie_change_notifier.cc chore: more iwyu (#43063) 2024-07-29 12:42:57 -05:00
cookie_change_notifier.h chore: more iwyu (#43063) 2024-07-29 12:42:57 -05:00
draggable_region_provider.h refactor: move draggable regions to WebContents (#36230) 2022-11-07 10:15:57 -08:00
electron_api_ipc_handler_impl.cc refactor: add static ReplyChannel::SendError() helper (#49372) 2026-01-14 09:34:28 +01:00
electron_api_ipc_handler_impl.h refactor: allocate gin_helper::internal::Event on cpp heap (#48161) 2025-08-27 09:30:50 +09:00
electron_api_sw_ipc_handler_impl.cc refactor: add static ReplyChannel::SendError() helper (#49372) 2026-01-14 09:34:28 +01:00
electron_api_sw_ipc_handler_impl.h refactor: allocate gin_helper::internal::Event on cpp heap (#48161) 2025-08-27 09:30:50 +09:00
electron_autofill_driver.cc feat: replace BrowserView with WebContentsView (#35658) 2023-12-13 13:01:03 -08:00
electron_autofill_driver.h chore: more iwyu (#43063) 2024-07-29 12:42:57 -05:00
electron_autofill_driver_factory.cc refactor: use std::map::try_emplace() over std::map::insert() (#46761) 2025-04-25 13:11:53 -05:00
electron_autofill_driver_factory.h perf: use absl::flat_hash_map instead of std::unordered_map (#46202) 2025-03-24 10:09:14 +01:00
electron_browser_client.cc feat: make Chrome extensions work on custom protocols (#50588) 2026-04-02 20:10:04 -07:00
electron_browser_client.h chore: bump chromium to 141.0.7390.7 (main) (#48212) 2025-09-08 12:57:15 +02:00
electron_browser_context.cc refactor: prefer upstream gin::Arguments::ThrowTypeError() over gin_helper (#48368) 2025-09-24 19:10:05 -05:00
electron_browser_context.h chore: bump chromium to 144.0.7547.0 (40-x-y) (#49146) 2025-12-05 12:18:13 -05:00
electron_browser_main_parts.cc chore: bump chromium to 144.0.7547.0 (40-x-y) (#49146) 2025-12-05 12:18:13 -05:00
electron_browser_main_parts.h fix: initialze featurelist before parsing features (#48411) 2025-10-03 01:18:14 +02:00
electron_browser_main_parts_mac.mm chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
electron_browser_main_parts_posix.cc chore: bump chromium to 137.0.7128.1 (main) (#46482) 2025-04-22 15:53:29 -04:00
electron_crypto_module_delegate_nss.cc refactor: allocate gin_helper::internal::Event on cpp heap (#48161) 2025-08-27 09:30:50 +09:00
electron_crypto_module_delegate_nss.h feat: Implement password delegate for NSS (#41205) 2024-07-17 09:48:03 -04:00
electron_download_manager_delegate.cc fix: potential UAF in OnDownloadPathGenerated (#50011) 2026-03-02 18:35:40 -05:00
electron_download_manager_delegate.h refactor: track downloads by guid (#45675) 2025-02-19 16:49:34 -06:00
electron_gpu_client.cc chore: bump chromium to 100.0.4857.0 (main) (#32419) 2022-02-09 18:58:52 -08:00
electron_gpu_client.h chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09:00
electron_navigation_throttle.cc chore: bump chromium to 140.0.7281.0 (main) (#47616) 2025-07-14 13:42:37 -07:00
electron_navigation_throttle.h chore: bump chromium to 138.0.7190.0 (main) (#47107) 2025-06-03 11:19:20 -04:00
electron_pdf_document_helper_client.cc chore: bump chromium to 140.0.7314.0 (main) (#47882) 2025-07-28 15:31:54 -07:00
electron_pdf_document_helper_client.h chore: bump chromium to 142.0.7417.0 (main) (#48275) 2025-09-22 20:16:27 -07:00
electron_permission_manager.cc fix: prevent use-after-free in permission request callbacks (#50036) 2026-03-02 20:44:50 -08:00
electron_permission_manager.h fix: prevent use-after-free in permission request callbacks (#50036) 2026-03-02 20:44:50 -08:00
electron_plugin_info_host_impl.cc chore: bump chromium to 144.0.7547.0 (40-x-y) (#49146) 2025-12-05 12:18:13 -05:00
electron_plugin_info_host_impl.h chore: bump chromium to 144.0.7547.0 (40-x-y) (#49146) 2025-12-05 12:18:13 -05:00
electron_preconnect_manager_delegate.cc chore: bump chromium to 140.0.7314.0 (main) (#47882) 2025-07-28 15:31:54 -07:00
electron_preconnect_manager_delegate.h chore: bump chromium to 140.0.7339.2 (main) (#47929) 2025-08-06 20:14:23 -04:00
electron_speech_recognition_manager_delegate.cc chore: bump chromium to 140.0.7339.2 (main) (#47929) 2025-08-06 20:14:23 -04:00
electron_speech_recognition_manager_delegate.h chore: bump chromium to 140.0.7339.2 (main) (#47929) 2025-08-06 20:14:23 -04:00
electron_web_contents_utility_handler_impl.cc chore: bump chromium to 137.0.7128.1 (main) (#46482) 2025-04-22 15:53:29 -04:00
electron_web_contents_utility_handler_impl.h refactor: remove unused system header includes (#46015) 2025-03-14 10:59:15 -05:00
electron_web_ui_controller_factory.cc chore: bump chromium to 143.0.7469.0 (main) (#48548) 2025-10-15 14:10:10 -07:00
electron_web_ui_controller_factory.h chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09:00
event_emitter_mixin.h refactor: allocate api::Debugger on cpp heap (#48266) 2025-09-11 16:03:17 -04:00
extended_web_contents_observer.h fix: modernize-use-equals-default warnings (#44935) 2024-12-03 16:25:48 -06:00
fake_location_provider.cc chore: remove unused base/ includes (#43688) 2024-09-12 16:05:37 +02:00
fake_location_provider.h chore: bump chromium to 116.0.5845.0 (main) (#38827) 2023-06-22 10:51:15 +02:00
feature_list.cc fix: re-enable MacWebContentsOcclusion with embedder window fix (#50713) 2026-04-06 10:14:32 -04:00
feature_list.h feat: add support for system picker in setDisplayMediaRequestHandler (#43581) 2024-09-10 16:05:57 -07:00
feature_list_mac.mm feat: add support for system picker in setDisplayMediaRequestHandler (#43581) 2024-09-10 16:05:57 -07:00
file_select_helper.cc refactor: return-braced-init-list pt 2 of 2 (#44870) 2024-11-29 11:44:33 -06:00
file_select_helper.h chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
file_select_helper_mac.mm refactor: replace remaining NULL with nullptr (#40053) 2023-10-03 12:26:35 -07:00
font_defaults.cc chore: bump chromium to 141.0.7390.7 (main) (#48212) 2025-09-08 12:57:15 +02:00
font_defaults.h fix: resolve font list in default prefernce values (#45905) 2025-03-07 18:22:03 +09:00
javascript_environment.cc chore: bump chromium to 136.0.7095.0 (main) (#46118) 2025-04-03 19:02:49 -05:00
javascript_environment.h chore: bump chromium to 136.0.7095.0 (main) (#46118) 2025-04-03 19:02:49 -05:00
login_handler.cc feat: support WebSocket authentication handling (#49064) 2026-01-12 11:23:31 -05:00
login_handler.h feat: support WebSocket authentication handling (#49064) 2026-01-12 11:23:31 -05:00
microtasks_runner.cc perf: remove isolate scope from DidProcessTask() (#44439) 2024-10-29 23:25:40 -05:00
microtasks_runner.h chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00
native_window.cc fix: the parent window remained interactive after the modal window was opened (#48864) 2025-11-10 13:55:46 +01:00
native_window.h chore: remove unused reference to api::BrowserView (#48474) 2025-10-08 10:43:28 +02:00
native_window_features.cc chore: bump chromium to 127.0.6521.0 (main) (#42118) 2024-06-07 17:18:35 -04:00
native_window_features.h fix: Add support for Wayland window decorations (#29618) 2022-01-26 13:59:09 -08:00
native_window_mac.h fix: prevent traffic light buttons flashing on deminiaturize (#50207) 2026-03-11 15:36:30 -04:00
native_window_mac.mm fix: prevent traffic light buttons flashing on deminiaturize (#50207) 2026-03-11 15:36:30 -04:00
native_window_observer.h refactor: pass gfx::ResizeEdge by value (#46935) 2025-05-06 11:57:53 -05:00
native_window_views.cc fix: user resizable transparent windows on win32 (#50301) 2026-03-17 09:46:36 +01:00
native_window_views.h chore: bump chromium to 143.0.7451.0 (main) (#48362) 2025-10-13 12:21:54 -04:00
native_window_views_win.cc fix: accentColor set distinguishes the frame (#48405) 2025-10-03 20:10:18 +02:00
network_hints_handler_impl.cc refactor: allocate api::Session on cpp heap (#48141) 2025-08-25 18:52:06 +09:00
network_hints_handler_impl.h chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00
preload_script.cc refactor: move gin::Converter<PreloadScript> impl to a .cc file (#47445) 2025-06-13 10:15:32 +02:00
preload_script.h refactor: move gin::Converter<PreloadScript> impl to a .cc file (#47445) 2025-06-13 10:15:32 +02:00
protocol_registry.cc perf: prefer GURL string_view getters (#43443) 2024-08-23 17:15:45 -05:00
protocol_registry.h perf: prefer GURL string_view getters (#43443) 2024-08-23 17:15:45 -05:00
relauncher.cc refactor: remove unused system header includes (#46015) 2025-03-14 10:59:15 -05:00
relauncher.h refactor: reduce scope of relauncher's internal constants (#44860) 2024-11-30 06:54:40 -06:00
relauncher_linux.cc chore: bump chromium to 141.0.7390.7 (main) (#48212) 2025-09-08 12:57:15 +02:00
relauncher_mac.cc chore: remove unused #includes (#42971) 2024-07-22 11:31:32 +02:00
relauncher_win.cc fix: use proper quoting for exe paths and args on Windows (#50075) 2026-03-05 10:27:40 +01:00
session_preferences.cc feat: service worker preload scripts for improved extensions support (#44411) 2025-01-31 09:32:45 -05:00
session_preferences.h feat: service worker preload scripts for improved extensions support (#44411) 2025-01-31 09:32:45 -05:00
special_storage_policy.cc chore: remove unused base/ includes (#43688) 2024-09-12 16:05:37 +02:00
special_storage_policy.h chore: bump chromium to 106.0.5216.0 (main) (#34993) 2022-08-17 11:35:53 -07:00
web_contents_permission_helper.cc fix: propagate requesting frame through sync permission checks (#50719) 2026-04-06 11:50:52 -04:00
web_contents_permission_helper.h fix: propagate requesting frame through sync permission checks (#50719) 2026-04-06 11:50:52 -04:00
web_contents_preferences.cc fix: read nodeIntegrationInWorker from per-frame WebPreferences (#50122) (#50467) 2026-03-24 22:48:27 +00:00
web_contents_preferences.h chore: remove unused commandLineSwitches flag (#50012) 2026-03-02 20:48:33 -08:00
web_contents_zoom_controller.cc chore: bump chromium to 143.0.7451.0 (main) (#48362) 2025-10-13 12:21:54 -04:00
web_contents_zoom_controller.h chore: bump chromium to 143.0.7489.0 (main) (#48642) 2025-10-23 16:28:51 -04:00
web_contents_zoom_observer.h chore: more iwyu (#43063) 2024-07-29 12:42:57 -05:00
web_view_guest_delegate.cc chore: bump chromium to 140.0.7281.0 (main) (#47616) 2025-07-14 13:42:37 -07:00
web_view_guest_delegate.h chore: bump chromium to 140.0.7281.0 (main) (#47616) 2025-07-14 13:42:37 -07:00
web_view_manager.cc chore: bump chromium to 121.0.6147.0 (main) (#40523) 2023-11-28 13:40:12 -08:00
web_view_manager.h perf: use flat_set, flat_map for small, trivially-moved containers (#40817) 2024-01-05 12:18:31 +01:00
window_list.cc perf: avoid copying a vector when calling ConvertToWeakPtrVector() (#47593) 2025-06-29 21:32:03 +02:00
window_list.h refactor: migrate deprecated LazyInstance code to NoDestructor (#40927) 2024-01-10 14:01:49 -06:00
window_list_observer.h fix: modernize-use-equals-default warnings (#44935) 2024-12-03 16:25:48 -06:00
zoom_level_delegate.cc chore: bump chromium to 143.0.7489.0 (main) (#48642) 2025-10-23 16:28:51 -04:00
zoom_level_delegate.h chore: bump chromium to 143.0.7489.0 (main) (#48642) 2025-10-23 16:28:51 -04:00