[GTK][WPE] WebDriver: handle acceptInsecureCertificates capability
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Jun 2018 07:23:40 +0000 (07:23 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Jun 2018 07:23:40 +0000 (07:23 +0000)
https://bugs.webkit.org/show_bug.cgi?id=186560

Reviewed by Brian Burg.

Source/JavaScriptCore:

Add SessionCapabilities struct to Client class and unify requestAutomationSession() methods into a single one
that always receives the session capabilities.

* inspector/remote/RemoteInspector.h:
* inspector/remote/RemoteInspectorConstants.h:
* inspector/remote/cocoa/RemoteInspectorCocoa.mm:
(Inspector::RemoteInspector::receivedAutomationSessionRequestMessage): Move the parsing of mac capabilities from
WebKit here and fill the SessionCapabilities instead.
* inspector/remote/glib/RemoteInspectorGlib.cpp:
(Inspector::RemoteInspector::requestAutomationSession): Pass SessionCapabilities to the client.
* inspector/remote/glib/RemoteInspectorServer.cpp:
(Inspector::RemoteInspectorServer::startAutomationSession): Process SessionCapabilities.
* inspector/remote/glib/RemoteInspectorServer.h:

Source/WebDriver:

Send session capabilities as part of the StartAutomationSession message. For now only acceptInsecureCerts
capability is sent.

* glib/SessionHostGlib.cpp:
(WebDriver::SessionHost::startAutomationSession):
* gtk/WebDriverServiceGtk.cpp:
(WebDriver::WebDriverService::platformCapabilities): Remove default value of acceptInsecureCerts, since that's
now handled by the browser.
* wpe/WebDriverServiceWPE.cpp:
(WebDriver::WebDriverService::platformCapabilities): Ditto.

Source/WebKit:

* UIProcess/API/glib/WebKitAutomationSession.cpp:
(webkitAutomationSessionCreate): Check the acceptInsecureCertificates capability and set the TLS error policy in
the WebContext accordingly if needed.
* UIProcess/API/glib/WebKitAutomationSessionPrivate.h:
* UIProcess/API/glib/WebKitWebContext.cpp:
* UIProcess/Cocoa/AutomationClient.h:
* UIProcess/Cocoa/AutomationClient.mm:
(WebKit::AutomationClient::requestAutomationSession): Use SessionCapabilities to fill the session configuration.
(WebKit::AutomationClient::requestAutomationSessionWithCapabilities): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232833 268f45cc-cd09-0410-ab3c-d52691b4dbfc

17 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/inspector/remote/RemoteInspector.h
Source/JavaScriptCore/inspector/remote/RemoteInspectorConstants.h
Source/JavaScriptCore/inspector/remote/cocoa/RemoteInspectorCocoa.mm
Source/JavaScriptCore/inspector/remote/glib/RemoteInspectorGlib.cpp
Source/JavaScriptCore/inspector/remote/glib/RemoteInspectorServer.cpp
Source/JavaScriptCore/inspector/remote/glib/RemoteInspectorServer.h
Source/WebDriver/ChangeLog
Source/WebDriver/glib/SessionHostGlib.cpp
Source/WebDriver/gtk/WebDriverServiceGtk.cpp
Source/WebDriver/wpe/WebDriverServiceWPE.cpp
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/glib/WebKitAutomationSession.cpp
Source/WebKit/UIProcess/API/glib/WebKitAutomationSessionPrivate.h
Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp
Source/WebKit/UIProcess/Cocoa/AutomationClient.h
Source/WebKit/UIProcess/Cocoa/AutomationClient.mm

index e65423d..a4ea135 100644 (file)
@@ -1,3 +1,24 @@
+2018-06-14  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        [GTK][WPE] WebDriver: handle acceptInsecureCertificates capability
+        https://bugs.webkit.org/show_bug.cgi?id=186560
+
+        Reviewed by Brian Burg.
+
+        Add SessionCapabilities struct to Client class and unify requestAutomationSession() methods into a single one
+        that always receives the session capabilities.
+
+        * inspector/remote/RemoteInspector.h:
+        * inspector/remote/RemoteInspectorConstants.h:
+        * inspector/remote/cocoa/RemoteInspectorCocoa.mm:
+        (Inspector::RemoteInspector::receivedAutomationSessionRequestMessage): Move the parsing of mac capabilities from
+        WebKit here and fill the SessionCapabilities instead.
+        * inspector/remote/glib/RemoteInspectorGlib.cpp:
+        (Inspector::RemoteInspector::requestAutomationSession): Pass SessionCapabilities to the client.
+        * inspector/remote/glib/RemoteInspectorServer.cpp:
+        (Inspector::RemoteInspectorServer::startAutomationSession): Process SessionCapabilities.
+        * inspector/remote/glib/RemoteInspectorServer.h:
+
 2018-06-13  Adrian Perez de Castro  <aperez@igalia.com>
 
         [WPE] Trying to access the remote inspector hits an assertion in the UIProcess
index 6ae7c09..9cc58f7 100644 (file)
@@ -72,14 +72,19 @@ public:
             String browserVersion;
         };
 
+        struct SessionCapabilities {
+            bool acceptInsecureCertificates { false };
+#if PLATFORM(COCOA)
+            std::optional<bool> allowInsecureMediaCapture;
+            std::optional<bool> suppressICECandidateFiltering;
+#endif
+        };
+
         virtual ~Client() { }
         virtual bool remoteAutomationAllowed() const = 0;
         virtual String browserName() const { return { }; }
         virtual String browserVersion() const { return { }; }
-        virtual void requestAutomationSession(const String& sessionIdentifier) = 0;
-#if PLATFORM(COCOA)
-        virtual void requestAutomationSessionWithCapabilities(NSString *sessionIdentifier, NSDictionary *forwardedCapabilities) = 0;
-#endif
+        virtual void requestAutomationSession(const String& sessionIdentifier, const SessionCapabilities&) = 0;
     };
 
     static void startDisabled();
@@ -118,7 +123,7 @@ public:
     void updateTargetListing(unsigned targetIdentifier);
 
 #if USE(GLIB)
-    void requestAutomationSession(const char* sessionID);
+    void requestAutomationSession(const char* sessionID, const Client::SessionCapabilities&);
     void setup(unsigned targetIdentifier);
     void sendMessageToTarget(unsigned targetIdentifier, const char* message);
 #endif
index b947efd..86bd8f7 100644 (file)
@@ -90,7 +90,6 @@
 #define WIRSessionCapabilitiesKey                  @"WIRSessionCapabilitiesKey"
 #define WIRAutomationSessionRequestMessage         @"WIRAutomationSessionRequestMessage"
 
-// These definitions are shared between WebDriver.framework and WebKit.
 // The value for WIRSessionCapabilitiesKey is a dictionary that holds these capability key-value pairs.
 
 #define WIRAllowInsecureMediaCaptureCapabilityKey      @"org.webkit.webdriver.webrtc.allow-insecure-media-capture"
index c7f47fb..1bc4441 100644 (file)
@@ -690,13 +690,24 @@ void RemoteInspector::receivedAutomationSessionRequestMessage(NSDictionary *user
     NSDictionary *forwardedCapabilities = userInfo[WIRSessionCapabilitiesKey];
     BAIL_IF_UNEXPECTED_TYPE_ALLOWING_NIL(forwardedCapabilities, [NSDictionary class]);
 
+    Client::SessionCapabilities sessionCapabilities;
+    if (NSNumber *value = forwardedCapabilities[WIRAllowInsecureMediaCaptureCapabilityKey]) {
+        if ([value isKindOfClass:[NSNumber class]])
+            sessionCapabilities.allowInsecureMediaCapture = value.boolValue;
+    }
+
+    if (NSNumber *value = forwardedCapabilities[WIRSuppressICECandidateFilteringCapabilityKey]) {
+        if ([value isKindOfClass:[NSNumber class]])
+            sessionCapabilities.suppressICECandidateFiltering = value.boolValue;
+    }
+
     if (!m_client)
         return;
 
     if (!m_clientCapabilities || !m_clientCapabilities->remoteAutomationAllowed)
         return;
 
-    m_client->requestAutomationSessionWithCapabilities(suggestedSessionIdentifier, forwardedCapabilities);
+    m_client->requestAutomationSession(suggestedSessionIdentifier, sessionCapabilities);
 }
 
 } // namespace Inspector
index eb761b8..1d00a30 100644 (file)
@@ -349,7 +349,7 @@ void RemoteInspector::sendMessageToTarget(unsigned targetIdentifier, const char*
         connectionToTarget->sendMessageToTarget(String::fromUTF8(message));
 }
 
-void RemoteInspector::requestAutomationSession(const char* sessionID)
+void RemoteInspector::requestAutomationSession(const char* sessionID, const Client::SessionCapabilities& capabilities)
 {
     if (!m_client)
         return;
@@ -360,7 +360,7 @@ void RemoteInspector::requestAutomationSession(const char* sessionID)
     if (!sessionID || !sessionID[0])
         return;
 
-    m_client->requestAutomationSession(String::fromUTF8(sessionID));
+    m_client->requestAutomationSession(String::fromUTF8(sessionID), capabilities);
     updateClientCapabilities();
 }
 
index 16cbabc..d15990c 100644 (file)
@@ -28,7 +28,6 @@
 
 #if ENABLE(REMOTE_INSPECTOR)
 
-#include "RemoteInspector.h"
 #include "RemoteInspectorUtils.h"
 #include <gio/gio.h>
 #include <wtf/Vector.h>
@@ -80,6 +79,7 @@ static const char introspectionXML[] =
     "    </method>"
     "    <method name='StartAutomationSession'>"
     "      <arg type='s' name='sessionID' direction='in'/>"
+    "      <arg type='b' name='acceptInsecureCertificates' direction='in'/>"
     "      <arg type='s' name='browserName' direction='out'/>"
     "      <arg type='s' name='browserVersion' direction='out'/>"
     "    </method>"
@@ -123,12 +123,15 @@ const GDBusInterfaceVTable RemoteInspectorServer::s_interfaceVTable = {
             g_dbus_method_invocation_return_value(invocation, nullptr);
         } else if (!g_strcmp0(methodName, "StartAutomationSession")) {
             const char* sessionID;
-            g_variant_get(parameters, "(&s)", &sessionID);
-            inspectorServer->startAutomationSession(connection, sessionID);
-            auto capabilities = RemoteInspector::singleton().clientCapabilities();
+            gboolean acceptInsecureCertificates;
+            g_variant_get(parameters, "(&sb)", &sessionID, &acceptInsecureCertificates);
+            RemoteInspector::Client::SessionCapabilities capabilities;
+            capabilities.acceptInsecureCertificates = acceptInsecureCertificates;
+            inspectorServer->startAutomationSession(connection, sessionID, capabilities);
+            auto clientCapabilities = RemoteInspector::singleton().clientCapabilities();
             g_dbus_method_invocation_return_value(invocation, g_variant_new("(ss)",
-                capabilities ? capabilities->browserName.utf8().data() : "",
-                capabilities ? capabilities->browserVersion.utf8().data() : ""));
+                clientCapabilities ? clientCapabilities->browserName.utf8().data() : "",
+                clientCapabilities ? clientCapabilities->browserVersion.utf8().data() : ""));
         } else
             g_dbus_method_invocation_return_value(invocation, nullptr);
     },
@@ -391,13 +394,13 @@ void RemoteInspectorServer::sendMessageToFrontend(GDBusConnection* remoteInspect
         -1, m_cancellable.get(), RemoteInspectorServerInternal::dbusConnectionCallAsyncReadyCallback, nullptr);
 }
 
-void RemoteInspectorServer::startAutomationSession(GDBusConnection* automationConnection, const char* sessionID)
+void RemoteInspectorServer::startAutomationSession(GDBusConnection* automationConnection, const char* sessionID, const RemoteInspector::Client::SessionCapabilities& capabilities)
 {
     if (!m_automationConnection)
         m_automationConnection = automationConnection;
     ASSERT(m_automationConnection.get() == automationConnection);
 
-    RemoteInspector::singleton().requestAutomationSession(sessionID);
+    RemoteInspector::singleton().requestAutomationSession(sessionID, capabilities);
 }
 
 } // namespace Inspector
index 6d88482..f6c7b4e 100644 (file)
@@ -27,6 +27,7 @@
 
 #if ENABLE(REMOTE_INSPECTOR)
 
+#include "RemoteInspector.h"
 #include <wtf/HashMap.h>
 #include <wtf/HashSet.h>
 #include <wtf/glib/GRefPtr.h>
@@ -65,7 +66,7 @@ private:
     void clientConnectionClosed(GDBusConnection*);
     void sendMessageToFrontend(GDBusConnection*, uint64_t target, const char*);
     void sendMessageToBackend(GDBusConnection*, uint64_t connectionID, uint64_t targetID, const char*);
-    void startAutomationSession(GDBusConnection*, const char* sessionID);
+    void startAutomationSession(GDBusConnection*, const char* sessionID, const RemoteInspector::Client::SessionCapabilities&);
 
     static void clientConnectionClosedCallback(GDBusConnection*, gboolean remotePeerVanished, GError*, RemoteInspectorServer*);
 
index 807a5be..3cd61c4 100644 (file)
@@ -1,3 +1,21 @@
+2018-06-14  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        [GTK][WPE] WebDriver: handle acceptInsecureCertificates capability
+        https://bugs.webkit.org/show_bug.cgi?id=186560
+
+        Reviewed by Brian Burg.
+
+        Send session capabilities as part of the StartAutomationSession message. For now only acceptInsecureCerts
+        capability is sent.
+
+        * glib/SessionHostGlib.cpp:
+        (WebDriver::SessionHost::startAutomationSession):
+        * gtk/WebDriverServiceGtk.cpp:
+        (WebDriver::WebDriverService::platformCapabilities): Remove default value of acceptInsecureCerts, since that's
+        now handled by the browser.
+        * wpe/WebDriverServiceWPE.cpp:
+        (WebDriver::WebDriverService::platformCapabilities): Ditto.
+
 2018-06-10  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [WPE] Add a MiniBrowser and use it to run WebDriver tests
index 1807b84..78f849b 100644 (file)
@@ -271,7 +271,7 @@ void SessionHost::startAutomationSession(Function<void (bool, std::optional<Stri
         INSPECTOR_DBUS_OBJECT_PATH,
         INSPECTOR_DBUS_INTERFACE,
         "StartAutomationSession",
-        g_variant_new("(s)", m_sessionID.utf8().data()),
+        g_variant_new("(sb)", m_sessionID.utf8().data(), m_capabilities.acceptInsecureCerts.value_or(false)),
         nullptr, G_DBUS_CALL_FLAGS_NO_AUTO_START,
         -1, m_cancellable.get(), [](GObject* source, GAsyncResult* result, gpointer userData) {
             GUniqueOutPtr<GError> error;
@@ -282,7 +282,7 @@ void SessionHost::startAutomationSession(Function<void (bool, std::optional<Stri
             auto sessionHost = static_cast<SessionHost*>(userData);
             if (!resultVariant) {
                 auto completionHandler = std::exchange(sessionHost->m_startSessionCompletionHandler, nullptr);
-                completionHandler(false, String("Failed to start automation session"));
+                completionHandler(false, makeString("Failed to start automation session: ", String::fromUTF8(error->message)));
                 return;
             }
 
index 0c4d274..1e5a9c2 100644 (file)
@@ -36,7 +36,6 @@ Capabilities WebDriverService::platformCapabilities()
 {
     Capabilities capabilities;
     capabilities.platformName = String("linux");
-    capabilities.acceptInsecureCerts = false;
     capabilities.setWindowRect = true;
     return capabilities;
 }
index d63f5a4..9275afb 100644 (file)
@@ -36,7 +36,6 @@ Capabilities WebDriverService::platformCapabilities()
 {
     Capabilities capabilities;
     capabilities.platformName = String("linux");
-    capabilities.acceptInsecureCerts = false;
     capabilities.setWindowRect = false;
     return capabilities;
 }
index 754f959..ed44a72 100644 (file)
@@ -1,3 +1,20 @@
+2018-06-14  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        [GTK][WPE] WebDriver: handle acceptInsecureCertificates capability
+        https://bugs.webkit.org/show_bug.cgi?id=186560
+
+        Reviewed by Brian Burg.
+
+        * UIProcess/API/glib/WebKitAutomationSession.cpp:
+        (webkitAutomationSessionCreate): Check the acceptInsecureCertificates capability and set the TLS error policy in
+        the WebContext accordingly if needed.
+        * UIProcess/API/glib/WebKitAutomationSessionPrivate.h:
+        * UIProcess/API/glib/WebKitWebContext.cpp:
+        * UIProcess/Cocoa/AutomationClient.h:
+        * UIProcess/Cocoa/AutomationClient.mm:
+        (WebKit::AutomationClient::requestAutomationSession): Use SessionCapabilities to fill the session configuration.
+        (WebKit::AutomationClient::requestAutomationSessionWithCapabilities): Deleted.
+
 2018-06-13  Adrian Perez de Castro  <aperez@igalia.com>
 
         [WPE] Trying to access the remote inspector hits an assertion in the UIProcess
index 0bd3832..83d445a 100644 (file)
@@ -288,10 +288,12 @@ static void webkit_automation_session_class_init(WebKitAutomationSessionClass* s
         G_TYPE_NONE);
 }
 
-WebKitAutomationSession* webkitAutomationSessionCreate(WebKitWebContext* webContext, const char* sessionID)
+WebKitAutomationSession* webkitAutomationSessionCreate(WebKitWebContext* webContext, const char* sessionID, const Inspector::RemoteInspector::Client::SessionCapabilities& capabilities)
 {
     auto* session = WEBKIT_AUTOMATION_SESSION(g_object_new(WEBKIT_TYPE_AUTOMATION_SESSION, "id", sessionID, nullptr));
     session->priv->webContext = webContext;
+    if (capabilities.acceptInsecureCertificates)
+        webkit_web_context_set_tls_errors_policy(webContext, WEBKIT_TLS_ERRORS_POLICY_IGNORE);
     return session;
 }
 
index ae2a2cc..b48cf70 100644 (file)
@@ -22,8 +22,9 @@
 #include "WebAutomationSession.h"
 #include "WebKitAutomationSession.h"
 #include "WebKitWebContext.h"
+#include <JavaScriptCore/RemoteInspector.h>
 
-WebKitAutomationSession* webkitAutomationSessionCreate(WebKitWebContext*, const char* sessionID);
+WebKitAutomationSession* webkitAutomationSessionCreate(WebKitWebContext*, const char* sessionID, const Inspector::RemoteInspector::Client::SessionCapabilities&);
 WebKit::WebAutomationSession& webkitAutomationSessionGetSession(WebKitAutomationSession*);
 String webkitAutomationSessionGetBrowserName(WebKitAutomationSession*);
 String webkitAutomationSessionGetBrowserVersion(WebKitAutomationSession*);
index b52591d..729d5f8 100644 (file)
@@ -232,10 +232,10 @@ private:
         return webkitAutomationSessionGetBrowserVersion(m_webContext->priv->automationSession.get());
     }
 
-    void requestAutomationSession(const String& sessionIdentifier) override
+    void requestAutomationSession(const String& sessionIdentifier, const Inspector::RemoteInspector::Client::SessionCapabilities& capabilities) override
     {
         ASSERT(!m_webContext->priv->automationSession);
-        m_webContext->priv->automationSession = adoptGRef(webkitAutomationSessionCreate(m_webContext, sessionIdentifier.utf8().data()));
+        m_webContext->priv->automationSession = adoptGRef(webkitAutomationSessionCreate(m_webContext, sessionIdentifier.utf8().data(), capabilities));
         g_signal_emit(m_webContext, signals[AUTOMATION_STARTED], 0, m_webContext->priv->automationSession.get());
         m_webContext->priv->processPool->setAutomationSession(&webkitAutomationSessionGetSession(m_webContext->priv->automationSession.get()));
     }
index 1d8316a..565e6ba 100644 (file)
@@ -49,11 +49,9 @@ private:
     bool allowsRemoteAutomation(WebProcessPool*) final { return remoteAutomationAllowed(); }
     void didRequestAutomationSession(WebKit::WebProcessPool*, const String& sessionIdentifier) final;
 
-    void requestAutomationSessionWithCapabilities(NSString *sessionIdentifier, NSDictionary *forwardedCapabilities) final;
-
     // RemoteInspector::Client
     bool remoteAutomationAllowed() const final;
-    void requestAutomationSession(const String& sessionIdentifier) final;
+    void requestAutomationSession(const String& sessionIdentifier, const Inspector::RemoteInspector::Client::SessionCapabilities&) final;
     String browserName() const final;
     String browserVersion() const final;
 
index 289f6cf..57dc53b 100644 (file)
@@ -34,7 +34,6 @@
 #import "_WKAutomationDelegate.h"
 #import "_WKAutomationSessionConfiguration.h"
 #import <JavaScriptCore/RemoteInspector.h>
-#import <JavaScriptCore/RemoteInspectorConstants.h>
 #import <wtf/spi/cf/CFBundleSPI.h>
 #import <wtf/text/WTFString.h>
 
@@ -63,7 +62,7 @@ AutomationClient::~AutomationClient()
 
 void AutomationClient::didRequestAutomationSession(WebKit::WebProcessPool*, const String& sessionIdentifier)
 {
-    requestAutomationSession(sessionIdentifier);
+    requestAutomationSession(sessionIdentifier, { });
 }
 
 // MARK: RemoteInspector::Client
@@ -76,10 +75,22 @@ bool AutomationClient::remoteAutomationAllowed() const
     return false;
 }
 
-void AutomationClient::requestAutomationSession(const String& sessionIdentifier)
+void AutomationClient::requestAutomationSession(const String& sessionIdentifier, const RemoteInspector::Client::SessionCapabilities& sessionCapabilities)
 {
-    NSString *retainedIdentifier = sessionIdentifier;
-    requestAutomationSessionWithCapabilities(retainedIdentifier, nil);
+    _WKAutomationSessionConfiguration *configuration = [[[_WKAutomationSessionConfiguration alloc] init] autorelease];
+    if (sessionCapabilities.allowInsecureMediaCapture)
+        configuration.allowsInsecureMediaCapture = sessionCapabilities.allowInsecureMediaCapture.value();
+    if (sessionCapabilities.suppressICECandidateFiltering)
+        configuration.suppressesICECandidateFiltering = sessionCapabilities.suppressICECandidateFiltering.value();
+
+    // Force clients to create and register a session asynchronously. Otherwise,
+    // RemoteInspector will try to acquire its lock to register the new session and
+    // deadlock because it's already taken while handling XPC messages.
+    NSString *requestedSessionIdentifier = sessionIdentifier;
+    dispatch_async(dispatch_get_main_queue(), ^{
+        if (m_delegateMethods.requestAutomationSession)
+            [m_delegate.get() _processPool:m_processPool didRequestAutomationSessionWithIdentifier:requestedSessionIdentifier configuration:configuration];
+    });
 }
 
 String AutomationClient::browserName() const
@@ -104,28 +115,6 @@ String AutomationClient::browserVersion() const
     return appBundle.infoDictionary[(__bridge NSString *)_kCFBundleShortVersionStringKey];
 }
 
-void AutomationClient::requestAutomationSessionWithCapabilities(NSString *sessionIdentifier, NSDictionary *forwardedCapabilities)
-{
-    _WKAutomationSessionConfiguration *configuration = [[[_WKAutomationSessionConfiguration alloc] init] autorelease];
-    if (NSNumber *value = forwardedCapabilities[WIRAllowInsecureMediaCaptureCapabilityKey]) {
-        if ([value isKindOfClass:[NSNumber class]])
-            configuration.allowsInsecureMediaCapture = value.boolValue;
-    }
-
-    if (NSNumber *value = forwardedCapabilities[WIRSuppressICECandidateFilteringCapabilityKey]) {
-        if ([value isKindOfClass:[NSNumber class]])
-            configuration.suppressesICECandidateFiltering = value.boolValue;
-    }
-
-    // Force clients to create and register a session asynchronously. Otherwise,
-    // RemoteInspector will try to acquire its lock to register the new session and
-    // deadlock because it's already taken while handling XPC messages.
-    dispatch_async(dispatch_get_main_queue(), ^{
-        if (m_delegateMethods.requestAutomationSession)
-            [m_delegate.get() _processPool:m_processPool didRequestAutomationSessionWithIdentifier:sessionIdentifier configuration:configuration];
-    });
-}
-
 } // namespace WebKit
 
 #endif // ENABLE(REMOTE_INSPECTOR)