Skip to content
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

fix: make preload calculation identical between sandbox & non-sandboxed #34531

Merged
merged 7 commits into from Jun 15, 2022

Conversation

nornagon
Copy link
Member

@nornagon nornagon commented Jun 13, 2022

Description of Change

This changes non-sandboxed renderers to load preload scripts the same way that
sandboxed renderers do: by sending a synchronous IPC to the main process to ask
for what preloads should be used.

This does change behavior in some cases. In particular, when running
window.open('about:blank') from a window with a preload and
nodeIntegrationInSubFrames: true, previously the child window would inherit
the parent window's preloads, due to the fact that about:blank child windows
don't go through a browser-side navigation in Chromium (see here
for further details).

Checklist

Release Notes

Notes: Fixed child about:blank windows from inheriting their parents' preload scripts when sandbox: false and nodeIntegrationInSubFrames: true.

@nornagon nornagon added semver/patch backwards-compatible bug fixes target/20-x-y labels Jun 13, 2022
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Jun 13, 2022
lib/renderer/init.ts Outdated Show resolved Hide resolved
@nornagon nornagon requested a review from a team as a code owner June 14, 2022 20:06
@nornagon nornagon requested a review from miniak June 14, 2022 20:06
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Jun 14, 2022
lib/browser/rpc-server.ts Outdated Show resolved Hide resolved
@nornagon nornagon requested a review from a team as a code owner June 15, 2022 00:03
@nornagon nornagon merged commit bad8d5e into main Jun 15, 2022
@nornagon nornagon deleted the normalize-preload-loading branch June 15, 2022 20:22
@release-clerk
Copy link

release-clerk bot commented Jun 15, 2022

Release Notes Persisted

Fixed child about:blank windows from inheriting their parents' preload scripts when sandbox: false and nodeIntegrationInSubFrames: true.

@trop
Copy link
Contributor

trop bot commented Jun 15, 2022

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

khalwa pushed a commit to solarwindscloud/electron that referenced this pull request Feb 22, 2023
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.

None yet

2 participants