mozilla / positron

a experimental, Electron-compatible runtime on top of Gecko
Other
564 stars 64 forks source link

opening multiple windows causes IPC to fail #55

Open mykmelez opened 8 years ago

mykmelez commented 8 years ago

Per https://github.com/mozilla/positron/pull/54#issuecomment-221422054, opening multiple windows will cause IPC to fail for the second and subsequent, because BrowserWindow.prototype.receiveMessage returns an array of values from all BrowserWindow instances, while _atom_rendereripc.sendSync returns only the first value from that array. We're only getting away with it because we've only been testing with apps that have one window.

To fix the problem, we might make BrowserWindow.prototype.receiveMessage be a static method that receives all IPC messages and routes them to the correct BrowserWindow instance.