Please sign in to comment.
Add handshake for the inner/outer xpc connections of the browser repl
Prior to this commit, the iframe connection just hopes that the roundtrip to the server plus 50ms is enough for the outer xpc connection to get established. This is the reason the browser repl occasionally fails to connect. This commit adds a handshake to that interaction, ensuring that both connections are established prior to sending any work to the outer. Note that it waits for the handshake to complete prior to sending the :ready message to the server. This is slower than sending to both the server and the outer simultaneously, then forcing the inner to wait for an ack from the outer. However, the code is significantly simpler this way. We can revisit if it's an issue.
- Loading branch information...
Showing with 39 additions and 8 deletions.