refactor: pass internal flag via IPC message struct for consistency (#16490)
This commit is contained in:
parent
0a5adfe365
commit
cc90919384
12 changed files with 103 additions and 65 deletions
|
@ -7,16 +7,16 @@ const v8Util = process.atomBinding('v8_util')
|
|||
const ipcRenderer = v8Util.getHiddenValue(global, 'ipc')
|
||||
const internal = false
|
||||
|
||||
ipcRenderer.send = function (...args) {
|
||||
return binding.send('-ipc-message', args)
|
||||
ipcRenderer.send = function (channel, ...args) {
|
||||
return binding.send(internal, channel, args)
|
||||
}
|
||||
|
||||
ipcRenderer.sendSync = function (...args) {
|
||||
return binding.sendSync('-ipc-message-sync', args)[0]
|
||||
ipcRenderer.sendSync = function (channel, ...args) {
|
||||
return binding.sendSync(internal, channel, args)[0]
|
||||
}
|
||||
|
||||
ipcRenderer.sendToHost = function (...args) {
|
||||
return binding.send('ipc-message-host', args)
|
||||
ipcRenderer.sendToHost = function (channel, ...args) {
|
||||
return binding.sendToHost(channel, args)
|
||||
}
|
||||
|
||||
ipcRenderer.sendTo = function (webContentsId, channel, ...args) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue