Files
serenity/Userland/Libraries/LibWeb/WebDriver/Client.cpp
Timothy Flynn a8b34254cb LibWeb: Defer handling of WebDriver endpoint invocations
We can currently crash on WebDriver session shutdown when we receive a
Delete Session command. This destroys the WebDriver client while we are
inside the client's socket's on_ready_to_read callback. This is not
allowed by AK::Function.

To avoid this, we now only read data from the socket in the callback. We
then defer handling the message to break out of the callback.

(cherry picked from commit 47af8c673381b1ffe15c85f711463a3fbeac165e)
2024-11-14 23:38:34 -05:00

15 KiB