mirror of
https://github.com/servo/servo
synced 2026-05-09 08:32:31 +02:00
Some Remote Debugging Protocol message types are specified as `oneway`, meaning that they expect no reply. Sending anything—including an error—in response to these messages throws the devtools client and actor out of sync. As noted in the `ClientRequest` docstring, most client messages expect exactly one reply, so `ClientRequest::handle()` includes a fail-safe that automatically sends an error message if none of the `reply()`, `reply_unchecked()`, or `reply_final()` methods have been called. This change introduces an additional method, `ClientRequest::mark_handled()`, which allows the actor handling the request to disarm the fail-safe without sending a reply over the wire, and it adds handling logic for 3 one-way message types that are frequently emitted by the Firefox Toolbox. Testing: This change introduces no new tests. Unless we take the unusual step of enumerating all supported one-way message types and validating each, automated tests provide little assurance of correctness. Meaningfully testing this feature would be cumbersome, and it would likely hamper future development more than it would help. Signed-off-by: Brent Schroeter <contact@brentsch.com>