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 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
This commit is contained in:
parent
134792a594
commit
dcb670fa46
5 changed files with 58 additions and 70 deletions
9
spec/fixtures/module/preload-ipc-ping-pong.js
vendored
Normal file
9
spec/fixtures/module/preload-ipc-ping-pong.js
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
const { ipcRenderer } = require('electron')
|
||||
|
||||
ipcRenderer.on('ping', function (event, payload) {
|
||||
ipcRenderer.sendTo(event.senderId, 'pong', payload)
|
||||
})
|
||||
|
||||
ipcRenderer.on('ping-æøåü', function (event, payload) {
|
||||
ipcRenderer.sendTo(event.senderId, 'pong-æøåü', payload)
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue