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: emit IPC event in correct context if isolation and sandbox enabled #16352
fix: emit IPC event in correct context if isolation and sandbox enabled #16352
Conversation
IPC events were not being delivered to renderer processes when both `contextIsolation` and `sandbox` were enabled. This is because the `AtomSandboxedRenderFrameObserver` class was incorrectly using the `MainWorldScriptContext`, rather than conditionally selecting the context based on if isolation was enabled. Fixes #11922
I made a mess of #16330, so I'm trying again here. I included your recommended test changes. Thank you for your patience with me. |
@nornagon, @codebytere can you please review? This is fixing quite a bad bug. |
Release Notes Persisted
|
Congrats on merging your first pull request! 🎉🎉🎉 |
I have automatically backported this PR to "4-0-x", please check out #16376 |
…ed (electron#16352) * fix: emit IPC event in correct context if isolation and sandbox enabled IPC events were not being delivered to renderer processes when both `contextIsolation` and `sandbox` were enabled. This is because the `AtomSandboxedRenderFrameObserver` class was incorrectly using the `MainWorldScriptContext`, rather than conditionally selecting the context based on if isolation was enabled. Fixes electron#11922
/trop run backport-to 3-1-x |
The backport process for this PR has been manually initiated, |
I was unable to backport this PR to "3-1-x" cleanly; |
…ed (#16352) * fix: emit IPC event in correct context if isolation and sandbox enabled IPC events were not being delivered to renderer processes when both `contextIsolation` and `sandbox` were enabled. This is because the `AtomSandboxedRenderFrameObserver` class was incorrectly using the `MainWorldScriptContext`, rather than conditionally selecting the context based on if isolation was enabled. Fixes #11922
…ed (#16352) * fix: emit IPC event in correct context if isolation and sandbox enabled IPC events were not being delivered to renderer processes when both `contextIsolation` and `sandbox` were enabled. This is because the `AtomSandboxedRenderFrameObserver` class was incorrectly using the `MainWorldScriptContext`, rather than conditionally selecting the context based on if isolation was enabled. Fixes #11922
A maintainer has manually backported this PR to "3-1-x", please check out #18668 |
…ed (#16352) (#18668) * fix: emit IPC event in correct context if isolation and sandbox enabled IPC events were not being delivered to renderer processes when both `contextIsolation` and `sandbox` were enabled. This is because the `AtomSandboxedRenderFrameObserver` class was incorrectly using the `MainWorldScriptContext`, rather than conditionally selecting the context based on if isolation was enabled. Fixes #11922
Description of Change
IPC events were not being delivered to renderer processes when both
contextIsolation
andsandbox
were enabled. This is because theAtomSandboxedRenderFrameObserver
class was incorrectly using theMainWorldScriptContext
, rather than conditionally selecting thecontext based on if isolation was enabled.
Fixes #11922
cc @miniak
Checklist
npm test
passesRelease Notes
Notes: Fixed delivery of IPC events to renderer processes when both
contextIsolation
andsandbox
are enabled.