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,12 +7,12 @@ const v8Util = process.atomBinding('v8_util')
|
|||
const ipcRenderer = v8Util.getHiddenValue(global, 'ipc-internal')
|
||||
const internal = true
|
||||
|
||||
ipcRenderer.send = function (...args) {
|
||||
return binding.send('ipc-internal-message', args)
|
||||
ipcRenderer.send = function (channel, ...args) {
|
||||
return binding.send(internal, channel, args)
|
||||
}
|
||||
|
||||
ipcRenderer.sendSync = function (...args) {
|
||||
return binding.sendSync('ipc-internal-message-sync', args)[0]
|
||||
ipcRenderer.sendSync = function (channel, ...args) {
|
||||
return binding.sendSync(internal, channel, args)[0]
|
||||
}
|
||||
|
||||
ipcRenderer.sendTo = function (webContentsId, channel, ...args) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue