WebKit Bugzilla
Attachment 340978 Details for
Bug 185866
: [GTK] WebDriver: implement AutomationSessionClient::didDisconnectFromRemote
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
wd-session-close.diff (text/plain), 4.42 KB, created by
Carlos Garcia Campos
on 2018-05-22 06:03:52 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Carlos Garcia Campos
Created:
2018-05-22 06:03:52 PDT
Size:
4.42 KB
patch
obsolete
>diff --git a/Source/WebDriver/ChangeLog b/Source/WebDriver/ChangeLog >index 2e108991df7..760bc799dc6 100644 >--- a/Source/WebDriver/ChangeLog >+++ b/Source/WebDriver/ChangeLog >@@ -1,3 +1,15 @@ >+2018-05-22 Carlos Garcia Campos <cgarcia@igalia.com> >+ >+ [GTK] WebDriver: implement AutomationSessionClient::didDisconnectFromRemote >+ https://bugs.webkit.org/show_bug.cgi?id=185866 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Close the dbus connection when receiving an empty target list. >+ >+ * glib/SessionHostGlib.cpp: >+ (WebDriver::SessionHost::setTargetList): >+ > 2018-05-21 Olivier Blin <olivier.blin@softathome.com> > > [WPE][WebDriver] add ICU include dirs >diff --git a/Source/WebDriver/glib/SessionHostGlib.cpp b/Source/WebDriver/glib/SessionHostGlib.cpp >index 12c9c1e505d..1807b846fdf 100644 >--- a/Source/WebDriver/glib/SessionHostGlib.cpp >+++ b/Source/WebDriver/glib/SessionHostGlib.cpp >@@ -306,6 +306,8 @@ void SessionHost::setTargetList(uint64_t connectionID, Vector<Target>&& targetLi > if (targetList.isEmpty()) { > m_target = Target(); > m_connectionID = 0; >+ if (m_dbusConnection) >+ g_dbus_connection_close(m_dbusConnection.get(), nullptr, nullptr, nullptr); > return; > } > >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 1ed3e76dffa..1358ad123cd 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,18 @@ >+2018-05-22 Carlos Garcia Campos <cgarcia@igalia.com> >+ >+ [GTK] WebDriver: implement AutomationSessionClient::didDisconnectFromRemote >+ https://bugs.webkit.org/show_bug.cgi?id=185866 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ To handle the case of the session being closed by the browser, for example in case of a network process >+ crash. This is currently causing WebDriver tests to timeout in the bot. >+ >+ * UIProcess/API/glib/WebKitAutomationSession.cpp: Add an implementation of didDisconnectFromRemote() to notify >+ the WebContext that the session will be closed. >+ * UIProcess/API/glib/WebKitWebContext.cpp: Remove the automation session when closed. >+ * UIProcess/API/glib/WebKitWebContextPrivate.h: >+ > 2018-05-22 Carlos Garcia Campos <cgarcia@igalia.com> > > Crash when loading a SVG image >diff --git a/Source/WebKit/UIProcess/API/glib/WebKitAutomationSession.cpp b/Source/WebKit/UIProcess/API/glib/WebKitAutomationSession.cpp >index dae29e14e09..a12249f6147 100644 >--- a/Source/WebKit/UIProcess/API/glib/WebKitAutomationSession.cpp >+++ b/Source/WebKit/UIProcess/API/glib/WebKitAutomationSession.cpp >@@ -82,6 +82,11 @@ private: > return String::fromUTF8(m_session->priv->id.data()); > } > >+ void didDisconnectFromRemote(WebAutomationSession&) override >+ { >+ webkitWebContextWillCloseAutomationSession(m_session->priv->webContext); >+ } >+ > void requestNewPageWithOptions(WebAutomationSession&, API::AutomationSessionBrowsingContextOptions, CompletionHandler<void(WebPageProxy*)>&& completionHandler) override > { > WebKitWebView* webView = nullptr; >diff --git a/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp b/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp >index 134ca5c2c0f..b52591d625e 100644 >--- a/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp >+++ b/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp >@@ -242,6 +242,12 @@ private: > > WebKitWebContext* m_webContext; > }; >+ >+void webkitWebContextWillCloseAutomationSession(WebKitWebContext* webContext) >+{ >+ webContext->priv->processPool->setAutomationSession(nullptr); >+ webContext->priv->automationSession = nullptr; >+} > #endif // ENABLE(REMOTE_INSPECTOR) > > WEBKIT_DEFINE_TYPE(WebKitWebContext, webkit_web_context, G_TYPE_OBJECT) >diff --git a/Source/WebKit/UIProcess/API/glib/WebKitWebContextPrivate.h b/Source/WebKit/UIProcess/API/glib/WebKitWebContextPrivate.h >index 9583115ebf0..6adb52b3c53 100644 >--- a/Source/WebKit/UIProcess/API/glib/WebKitWebContextPrivate.h >+++ b/Source/WebKit/UIProcess/API/glib/WebKitWebContextPrivate.h >@@ -47,3 +47,6 @@ void webkitWebContextWebViewDestroyed(WebKitWebContext*, WebKitWebView*); > WebKitWebView* webkitWebContextGetWebViewForPage(WebKitWebContext*, WebKit::WebPageProxy*); > GVariant* webkitWebContextInitializeWebExtensions(WebKitWebContext*); > void webkitWebContextInitializeNotificationPermissions(WebKitWebContext*); >+#if ENABLE(REMOTE_INSPECTOR) >+void webkitWebContextWillCloseAutomationSession(WebKitWebContext*); >+#endif
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
bburg
:
review+
ews-watchlist
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185866
: 340978 |
340982