mirror of
https://github.com/electron/electron.git
synced 2026-01-09 23:48:01 -05:00
fix: IPC emit order in -ipc-ports handler (#35320)
Co-authored-by: Milan Burda <miburda@microsoft.com>
This commit is contained in:
@@ -619,9 +619,9 @@ WebContents.prototype._init = function () {
|
||||
this.on('-ipc-ports' as any, function (event: Electron.IpcMainEvent, internal: boolean, channel: string, message: any, ports: any[]) {
|
||||
addSenderFrameToEvent(event);
|
||||
event.ports = ports.map(p => new MessagePortMain(p));
|
||||
ipc.emit(channel, event, message);
|
||||
const maybeWebFrame = webFrameMainBinding.fromIdOrNull(event.processId, event.frameId);
|
||||
maybeWebFrame && maybeWebFrame.ipc.emit(channel, event, message);
|
||||
ipc.emit(channel, event, message);
|
||||
ipcMain.emit(channel, event, message);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user