Title: [239606] trunk/Source/WebDriver
- Revision
- 239606
- Author
- [email protected]
- Date
- 2019-01-04 03:34:01 -0800 (Fri, 04 Jan 2019)
Log Message
[GLIB] WebDriver: browser close not correctly detected on session close in some cases
https://bugs.webkit.org/show_bug.cgi?id=193104
Reviewed by Michael Catanzaro.
This happens when the dbus connection is closed right before the response to SendMessageToBackend message is
going to be sent. In that case, g_dbus_connection_call async ready handler generates an error before the close
signal is emitted. Then, the close commands try to handle the error checking if SessionHost::isConnected(), but
it still returns true, because the browser is still alive, but the dbus connection has been closed.
* glib/SessionHostGlib.cpp:
(WebDriver::SessionHost::isConnected const): Session is connected when launching or when dbus connection hasn't
been closed.
Modified Paths
Diff
Modified: trunk/Source/WebDriver/ChangeLog (239605 => 239606)
--- trunk/Source/WebDriver/ChangeLog 2019-01-04 02:54:41 UTC (rev 239605)
+++ trunk/Source/WebDriver/ChangeLog 2019-01-04 11:34:01 UTC (rev 239606)
@@ -1,3 +1,19 @@
+2019-01-04 Carlos Garcia Campos <[email protected]>
+
+ [GLIB] WebDriver: browser close not correctly detected on session close in some cases
+ https://bugs.webkit.org/show_bug.cgi?id=193104
+
+ Reviewed by Michael Catanzaro.
+
+ This happens when the dbus connection is closed right before the response to SendMessageToBackend message is
+ going to be sent. In that case, g_dbus_connection_call async ready handler generates an error before the close
+ signal is emitted. Then, the close commands try to handle the error checking if SessionHost::isConnected(), but
+ it still returns true, because the browser is still alive, but the dbus connection has been closed.
+
+ * glib/SessionHostGlib.cpp:
+ (WebDriver::SessionHost::isConnected const): Session is connected when launching or when dbus connection hasn't
+ been closed.
+
2018-12-21 Carlos Garcia Campos <[email protected]>
[GLIB] WebDriver: dbusConnectionClosedCallback can be called after SessionHost has been deleted
Modified: trunk/Source/WebDriver/glib/SessionHostGlib.cpp (239605 => 239606)
--- trunk/Source/WebDriver/glib/SessionHostGlib.cpp 2019-01-04 02:54:41 UTC (rev 239605)
+++ trunk/Source/WebDriver/glib/SessionHostGlib.cpp 2019-01-04 11:34:01 UTC (rev 239606)
@@ -108,7 +108,8 @@
bool SessionHost::isConnected() const
{
- return !!m_browser;
+ // Session is connected when launching or when dbus connection hasn't been closed.
+ return m_browser && (!m_dbusConnection || !g_dbus_connection_is_closed(m_dbusConnection.get()));
}
struct ConnectToBrowserAsyncData {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes