Skip to content

Commit

Permalink
fix: IPC emit order in -ipc-ports handler (#35320)
Browse files Browse the repository at this point in the history
Co-authored-by: Milan Burda <miburda@microsoft.com>
  • Loading branch information
miniak and Milan Burda committed Aug 16, 2022
1 parent 6725391 commit e85450b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/browser/api/web-contents.ts
Expand Up @@ -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);
});

Expand Down

0 comments on commit e85450b

Please sign in to comment.