mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
refactor: pass internal flag via IPC message struct for consistency (#16490)
This commit is contained in:
committed by
Shelley Vohr
parent
0a5adfe365
commit
cc90919384
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user