child_process: emit IPC messages on next tick
Checklist
-
tests and code linting passes -
the commit message follows commit guidelines
Affected core subsystem(s)
child_process
Description of change
Currently, if an IPC event handler throws an error, it can cause the message to not be consumed, leading to messages piling up. This commit causes IPC events to be emitted on the next tick, allowing the channel's processing logic to move forward as normal.
Refs: #6561 (closed) Refs: #6902
R= @santigimeno @bnoordhuis