Commit 677fca4
committed
fix(kkrpc): dispatch to messageListeners in Electron utility process adapters
Both ElectronUtilityProcessIO (main-process side) and
ElectronUtilityProcessChildIO (child-process side) had on()/off()
methods that registered messageListeners, but handleMessage() never
checked them. Incoming messages went straight to resolveRead/queue,
so any listener registered via on("message", cb) would silently
never fire.
Every other IO adapter in kkrpc follows a three-tier dispatch
priority: messageListeners > resolveRead > messageQueue. The
Electron utility process adapters were the only ones that skipped
the first tier. This fix aligns them with the universal pattern
used by WorkerParentIO, WorkerChildIO, NodeIo, IframeParentIO,
IframeChildIO, WebSocketClientIO, and WebSocketServerIO.1 parent 6cbd387 commit 677fca4
2 files changed
+16
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
56 | | - | |
| 54 | + | |
| 55 | + | |
57 | 56 | | |
58 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
59 | 63 | | |
60 | 64 | | |
61 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
76 | | - | |
| 74 | + | |
| 75 | + | |
77 | 76 | | |
78 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
79 | 83 | | |
80 | 84 | | |
81 | 85 | | |
| |||
0 commit comments