Bug 292738
| Summary: | [WebDriver][BiDi] Driver segfault waiting for relay response when browser abruptly closes | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Lauro Moura <lmoura> |
| Component: | WebDriver | Assignee: | Lauro Moura <lmoura> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | bburg, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Lauro Moura
- 294391@main added support to relay BiDi commands into the browser with the inspector protocol method `Automation.processBidiMessage`.
- While the proper command reply is sent by the browser as a separate `Automation.bidiMessageSent` inspector event, the call to `Automation.processBidiMessage` stores its callback to wait for eventual errors during the relay process (e.g. unknown methods).
- In the case of a browser crash, `SessionHost::inspectorDisconnected` is called and flushes the pending callbacks with empty error payload.
- At the same time, `SessionHost::relayBidiCommand` assumes a `"message"` field is always present. As such, it crashes in this empty error scenario.
Patch incoming.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Lauro Moura
Pull request: https://github.com/WebKit/WebKit/pull/45148
EWS
Committed 294769@main (c89929f28371): <https://commits.webkit.org/294769@main>
Reviewed commits have been landed. Closing PR #45148 and removing active labels.
Radar WebKit Bug Importer
<rdar://problem/151113803>