Title: [240778] trunk/Source/WebDriver
- Revision
- 240778
- Author
- [email protected]
- Date
- 2019-01-31 05:06:16 -0800 (Thu, 31 Jan 2019)
Log Message
[GLIB] WebDriver: race condition when session starts
https://bugs.webkit.org/show_bug.cgi?id=194086
Reviewed by Philippe Normand.
This is causing flakiness in the bots, I can only reproduce it locally when my CPUs are at 100%. The thing
is that sometimes we receive an empty target list right after the connection is established because
RemoteInspector::setClient() calls pushListingsSoon() before a target has been registered. Most of the times the
target is registered before the listing is pushed, but it can happen that when pushed, the listing is still
empty. After the target is registered an empty target list means the connection was lost, so we clear the
connection and target. We need to ensure we do that only after the target has been registered.
* glib/SessionHostGlib.cpp:
Modified Paths
Diff
Modified: trunk/Source/WebDriver/ChangeLog (240777 => 240778)
--- trunk/Source/WebDriver/ChangeLog 2019-01-31 10:42:44 UTC (rev 240777)
+++ trunk/Source/WebDriver/ChangeLog 2019-01-31 13:06:16 UTC (rev 240778)
@@ -1,3 +1,19 @@
+2019-01-31 Carlos Garcia Campos <[email protected]>
+
+ [GLIB] WebDriver: race condition when session starts
+ https://bugs.webkit.org/show_bug.cgi?id=194086
+
+ Reviewed by Philippe Normand.
+
+ This is causing flakiness in the bots, I can only reproduce it locally when my CPUs are at 100%. The thing
+ is that sometimes we receive an empty target list right after the connection is established because
+ RemoteInspector::setClient() calls pushListingsSoon() before a target has been registered. Most of the times the
+ target is registered before the listing is pushed, but it can happen that when pushed, the listing is still
+ empty. After the target is registered an empty target list means the connection was lost, so we clear the
+ connection and target. We need to ensure we do that only after the target has been registered.
+
+ * glib/SessionHostGlib.cpp:
+
2019-01-29 Carlos Garcia Campos <[email protected]>
WebDriver: POST commands require a valid parameters object
Modified: trunk/Source/WebDriver/glib/SessionHostGlib.cpp (240777 => 240778)
--- trunk/Source/WebDriver/glib/SessionHostGlib.cpp 2019-01-31 10:42:44 UTC (rev 240777)
+++ trunk/Source/WebDriver/glib/SessionHostGlib.cpp 2019-01-31 13:06:16 UTC (rev 240778)
@@ -331,9 +331,11 @@
ASSERT(targetList.size() <= 1);
if (targetList.isEmpty()) {
m_target = Target();
- m_connectionID = 0;
- if (m_dbusConnection)
- g_dbus_connection_close(m_dbusConnection.get(), nullptr, nullptr, nullptr);
+ if (m_connectionID) {
+ if (m_dbusConnection)
+ g_dbus_connection_close(m_dbusConnection.get(), nullptr, nullptr, nullptr);
+ m_connectionID = 0;
+ }
return;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes