mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
The PDF viewer's "save with changes" feature uses `window.showSaveFilePicker()`, but the PDF extension runs in a cross-origin iframe (chrome-extension:// inside the app's origin). Chromium's File System Access API blocks cross-origin subframes from showing file pickers unless the embedder explicitly allows them via `ContentClient::IsFilePickerAllowedForCrossOriginSubframe()`. Chrome overrides this in `ChromeContentClient` to allowlist the PDF extension origin, but Electron never did — so the picker was always blocked with a SecurityError. This adds the same override to `ElectronContentClient`, allowing the built-in PDF extension origin to bypass the cross-origin check. Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>