refactor: only allow internal messages from the main process (#27676)
This commit is contained in:
parent
e46446e7e4
commit
706d9ede9b
8 changed files with 16 additions and 33 deletions
|
@ -305,7 +305,7 @@ function metaToError (meta: { type: 'error', value: any, members: ObjectMember[]
|
|||
}
|
||||
|
||||
function handleMessage (channel: string, handler: Function) {
|
||||
ipcRendererInternal.onMessageFromMain(channel, (event, passedContextId, id, ...args) => {
|
||||
ipcRendererInternal.on(channel, (event, passedContextId, id, ...args) => {
|
||||
if (passedContextId === contextId) {
|
||||
handler(id, ...args);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue