Add Connection::sendWithReply
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Aug 2016 22:59:12 +0000 (22:59 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Aug 2016 22:59:12 +0000 (22:59 +0000)
https://bugs.webkit.org/show_bug.cgi?id=161399

Reviewed by Tim Horton.

Connection::sendWithReply makes it easy to send a message and process its reply asynchronously on a given WorkQueue or RunLoop.
The reply handler is guaranteed to be called. If the reply is successfully received, it will consist of an std::tuple with the arguments,
otherwise it will be called with Nullopt.

* Platform/IPC/Connection.cpp:
(IPC::Connection::invalidate):
Go through all reply handlers and dispatch them with a null Decoder.

(IPC::Connection::sendMessageWithReply):
Add the reply handler to the m_replyHandlers hash map, and send the message.

(IPC::Connection::processIncomingSyncReply):
Check if the incoming reply has an entry in m_replyHandlers. If it does, dispatch its handler using the given dispatcher.

(IPC::Connection::connectionDidClose):
Go through all reply handlers and dispatch them with a null Decoder.

* Platform/IPC/Connection.h:
(IPC::Connection::sendWithReply):
Encode the message (we use the sync message ID infrastructure for this), then call sendMessageWithReply with a reply handler that
decodes the reply and calls the real reply handler.

* Platform/IPC/HandleMessage.h:
Forward declare Connection.

* UIProcess/Databases/DatabaseProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.h:
Forward declare WebsiteData.

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::~WebProcessProxy):
(WebKit::WebProcessProxy::processWillShutDown):
Remove m_pendingFetchWebsiteDataCallbacks.

(WebKit::WebProcessProxy::fetchWebsiteData):
Use Connection::sendWithReply.

(WebKit::WebProcessProxy::didFetchWebsiteData): Deleted.

* UIProcess/WebProcessProxy.h:
Remove members.

* UIProcess/WebProcessProxy.messages.in:
Remove DidFetchWebsiteData.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::fetchWebsiteData):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
Update the FetchWebsiteData message to have a reply parameter.

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

12 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/Platform/IPC/Connection.cpp
Source/WebKit2/Platform/IPC/Connection.h
Source/WebKit2/Platform/IPC/HandleMessage.h
Source/WebKit2/UIProcess/Databases/DatabaseProcessProxy.h
Source/WebKit2/UIProcess/Network/NetworkProcessProxy.h
Source/WebKit2/UIProcess/WebProcessProxy.cpp
Source/WebKit2/UIProcess/WebProcessProxy.h
Source/WebKit2/UIProcess/WebProcessProxy.messages.in
Source/WebKit2/WebProcess/WebProcess.cpp
Source/WebKit2/WebProcess/WebProcess.h
Source/WebKit2/WebProcess/WebProcess.messages.in

index 8995a09..ffa8248 100644 (file)
@@ -1,3 +1,61 @@
+2016-08-30  Anders Carlsson  <andersca@apple.com>
+
+        Add Connection::sendWithReply
+        https://bugs.webkit.org/show_bug.cgi?id=161399
+
+        Reviewed by Tim Horton.
+
+        Connection::sendWithReply makes it easy to send a message and process its reply asynchronously on a given WorkQueue or RunLoop.
+        The reply handler is guaranteed to be called. If the reply is successfully received, it will consist of an std::tuple with the arguments,
+        otherwise it will be called with Nullopt.
+
+        * Platform/IPC/Connection.cpp:
+        (IPC::Connection::invalidate):
+        Go through all reply handlers and dispatch them with a null Decoder.
+
+        (IPC::Connection::sendMessageWithReply):
+        Add the reply handler to the m_replyHandlers hash map, and send the message.
+
+        (IPC::Connection::processIncomingSyncReply):
+        Check if the incoming reply has an entry in m_replyHandlers. If it does, dispatch its handler using the given dispatcher.
+
+        (IPC::Connection::connectionDidClose):
+        Go through all reply handlers and dispatch them with a null Decoder.
+
+        * Platform/IPC/Connection.h:
+        (IPC::Connection::sendWithReply):
+        Encode the message (we use the sync message ID infrastructure for this), then call sendMessageWithReply with a reply handler that
+        decodes the reply and calls the real reply handler.
+
+        * Platform/IPC/HandleMessage.h:
+        Forward declare Connection.
+
+        * UIProcess/Databases/DatabaseProcessProxy.h:
+        * UIProcess/Network/NetworkProcessProxy.h:
+        Forward declare WebsiteData.
+
+        * UIProcess/WebProcessProxy.cpp:
+        (WebKit::WebProcessProxy::~WebProcessProxy):
+        (WebKit::WebProcessProxy::processWillShutDown):
+        Remove m_pendingFetchWebsiteDataCallbacks.
+
+        (WebKit::WebProcessProxy::fetchWebsiteData):
+        Use Connection::sendWithReply.
+
+        (WebKit::WebProcessProxy::didFetchWebsiteData): Deleted.
+
+        * UIProcess/WebProcessProxy.h:
+        Remove members.
+
+        * UIProcess/WebProcessProxy.messages.in:
+        Remove DidFetchWebsiteData.
+
+        * WebProcess/WebProcess.cpp:
+        (WebKit::WebProcess::fetchWebsiteData):
+        * WebProcess/WebProcess.h:
+        * WebProcess/WebProcess.messages.in:
+        Update the FetchWebsiteData message to have a reply parameter.
+
 2016-08-30  Brady Eidson  <beidson@apple.com>
 
         Fix runtime error caused by missing export after https://bugs.webkit.org/show_bug.cgi?id=160846
index 6d23338..14a3025 100644 (file)
 
 namespace IPC {
 
+struct Connection::ReplyHandler {
+    RefPtr<FunctionDispatcher> dispatcher;
+    Function<void (std::unique_ptr<Decoder>)> handler;
+};
+
 struct Connection::WaitForMessageState {
     WaitForMessageState(StringReference messageReceiverName, StringReference messageName, uint64_t destinationID, OptionSet<WaitForOption> waitForOptions)
         : messageReceiverName(messageReceiverName)
@@ -324,6 +329,17 @@ void Connection::invalidate()
     
     m_isValid = false;
 
+    {
+        std::lock_guard<Lock> lock(m_replyHandlersLock);
+        for (auto& replyHandler : m_replyHandlers.values()) {
+            replyHandler.dispatcher->dispatch([handler = WTFMove(replyHandler.handler)] {
+                handler(nullptr);
+            });
+        }
+
+        m_replyHandlers.clear();
+    }
+
     m_connectionQueue->dispatch([protectedThis = makeRef(*this)]() mutable {
         protectedThis->platformInvalidate();
     });
@@ -379,6 +395,25 @@ bool Connection::sendMessage(std::unique_ptr<Encoder> encoder, OptionSet<SendOpt
     return true;
 }
 
+void Connection::sendMessageWithReply(uint64_t requestID, std::unique_ptr<Encoder> encoder, FunctionDispatcher& replyDispatcher, Function<void (std::unique_ptr<Decoder>)>&& replyHandler)
+{
+    {
+        std::lock_guard<Lock> lock(m_replyHandlersLock);
+
+        if (!isValid()) {
+            replyDispatcher.dispatch([replyHandler = WTFMove(replyHandler)] {
+                replyHandler(nullptr);
+            });
+            return;
+        }
+
+        ASSERT(!m_replyHandlers.contains(requestID));
+        m_replyHandlers.set(requestID, ReplyHandler { &replyDispatcher, WTFMove(replyHandler) });
+    }
+
+    sendMessage(WTFMove(encoder), { });
+}
+
 bool Connection::sendSyncReply(std::unique_ptr<Encoder> encoder)
 {
     return sendMessage(WTFMove(encoder), { });
@@ -557,26 +592,44 @@ std::unique_ptr<Decoder> Connection::waitForSyncReply(uint64_t syncRequestID, st
 
 void Connection::processIncomingSyncReply(std::unique_ptr<Decoder> decoder)
 {
-    LockHolder locker(m_syncReplyStateMutex);
+    {
+        LockHolder locker(m_syncReplyStateMutex);
 
-    // Go through the stack of sync requests that have pending replies and see which one
-    // this reply is for.
-    for (size_t i = m_pendingSyncReplies.size(); i > 0; --i) {
-        PendingSyncReply& pendingSyncReply = m_pendingSyncReplies[i - 1];
+        // Go through the stack of sync requests that have pending replies and see which one
+        // this reply is for.
+        for (size_t i = m_pendingSyncReplies.size(); i > 0; --i) {
+            PendingSyncReply& pendingSyncReply = m_pendingSyncReplies[i - 1];
 
-        if (pendingSyncReply.syncRequestID != decoder->destinationID())
-            continue;
+            if (pendingSyncReply.syncRequestID != decoder->destinationID())
+                continue;
 
-        ASSERT(!pendingSyncReply.replyDecoder);
+            ASSERT(!pendingSyncReply.replyDecoder);
 
-        pendingSyncReply.replyDecoder = WTFMove(decoder);
-        pendingSyncReply.didReceiveReply = true;
+            pendingSyncReply.replyDecoder = WTFMove(decoder);
+            pendingSyncReply.didReceiveReply = true;
 
-        // We got a reply to the last send message, wake up the client run loop so it can be processed.
-        if (i == m_pendingSyncReplies.size())
-            SyncMessageState::singleton().wakeUpClientRunLoop();
+            // We got a reply to the last send message, wake up the client run loop so it can be processed.
+            if (i == m_pendingSyncReplies.size())
+                SyncMessageState::singleton().wakeUpClientRunLoop();
 
-        return;
+            return;
+        }
+    }
+
+    {
+        LockHolder locker(m_replyHandlersLock);
+
+        auto replyHandler = m_replyHandlers.take(decoder->destinationID());
+        if (replyHandler.dispatcher) {
+            replyHandler.dispatcher->dispatch([protectedThis = makeRef(*this), handler = WTFMove(replyHandler.handler), decoder = WTFMove(decoder)] () mutable {
+                if (!protectedThis->isValid()) {
+                    handler(nullptr);
+                    return;
+                }
+
+                handler(WTFMove(decoder));
+            });
+        }
     }
 
     // If we get here, it means we got a reply for a message that wasn't in the sync request stack or map.
@@ -703,6 +756,17 @@ void Connection::connectionDidClose()
     platformInvalidate();
 
     {
+        LockHolder locker(m_replyHandlersLock);
+        for (auto& replyHandler : m_replyHandlers.values()) {
+            replyHandler.dispatcher->dispatch([handler = WTFMove(replyHandler.handler)] {
+                handler(nullptr);
+            });
+        }
+
+        m_replyHandlers.clear();
+    }
+
+    {
         LockHolder locker(m_syncReplyStateMutex);
 
         ASSERT(m_shouldWaitForSyncReplies);
index 207f905..ed5ddf2 100644 (file)
@@ -29,6 +29,7 @@
 
 #include "Decoder.h"
 #include "Encoder.h"
+#include "HandleMessage.h"
 #include "MessageReceiver.h"
 #include <atomic>
 #include <wtf/Condition.h>
@@ -164,11 +165,13 @@ public:
     void postConnectionDidCloseOnConnectionWorkQueue();
 
     template<typename T> bool send(T&& message, uint64_t destinationID, OptionSet<SendOption> sendOptions = { });
+    template<typename T> void sendWithReply(T&& message, uint64_t destinationID, FunctionDispatcher& replyDispatcher, Function<void (Optional<typename CodingType<typename T::Reply>::Type>)>&& replyHandler);
     template<typename T> bool sendSync(T&& message, typename T::Reply&& reply, uint64_t destinationID, std::chrono::milliseconds timeout = std::chrono::milliseconds::max(), OptionSet<SendSyncOption> sendSyncOptions = { });
     template<typename T> bool waitForAndDispatchImmediately(uint64_t destinationID, std::chrono::milliseconds timeout, OptionSet<WaitForOption> waitForOptions = { });
 
-    std::unique_ptr<Encoder> createSyncMessageEncoder(StringReference messageReceiverName, StringReference messageName, uint64_t destinationID, uint64_t& syncRequestID);
     bool sendMessage(std::unique_ptr<Encoder>, OptionSet<SendOption> sendOptions);
+    void sendMessageWithReply(uint64_t requestID, std::unique_ptr<Encoder>, FunctionDispatcher& replyDispatcher, Function<void (std::unique_ptr<Decoder>)>&& replyHandler);
+    std::unique_ptr<Encoder> createSyncMessageEncoder(StringReference messageReceiverName, StringReference messageName, uint64_t destinationID, uint64_t& syncRequestID);
     std::unique_ptr<Decoder> sendSyncMessage(uint64_t syncRequestID, std::unique_ptr<Encoder>, std::chrono::milliseconds timeout, OptionSet<SendSyncOption> sendSyncOptions);
     bool sendSyncReply(std::unique_ptr<Encoder>);
 
@@ -270,6 +273,11 @@ private:
     Condition m_waitForMessageCondition;
     Lock m_waitForMessageMutex;
 
+    struct ReplyHandler;
+
+    Lock m_replyHandlersLock;
+    HashMap<uint64_t, ReplyHandler> m_replyHandlers;
+
     struct WaitForMessageState;
     WaitForMessageState* m_waitingForMessage;
 
@@ -325,7 +333,8 @@ private:
 #endif
 };
 
-template<typename T> bool Connection::send(T&& message, uint64_t destinationID, OptionSet<SendOption> sendOptions)
+template<typename T>
+bool Connection::send(T&& message, uint64_t destinationID, OptionSet<SendOption> sendOptions)
 {
     COMPILE_ASSERT(!T::isSync, AsyncMessageExpected);
 
@@ -335,6 +344,27 @@ template<typename T> bool Connection::send(T&& message, uint64_t destinationID,
     return sendMessage(WTFMove(encoder), sendOptions);
 }
 
+template<typename T>
+void Connection::sendWithReply(T&& message, uint64_t destinationID, FunctionDispatcher& replyDispatcher, Function<void (Optional<typename CodingType<typename T::Reply>::Type>)>&& replyHandler)
+{
+    uint64_t requestID = 0;
+    std::unique_ptr<Encoder> encoder = createSyncMessageEncoder(T::receiverName(), T::name(), destinationID, requestID);
+
+    encoder->encode(message.arguments());
+
+    sendMessageWithReply(requestID, WTFMove(encoder), replyDispatcher, [replyHandler = WTFMove(replyHandler)](std::unique_ptr<Decoder> decoder) {
+        if (decoder) {
+            typename CodingType<typename T::Reply>::Type reply;
+            if (decoder->decode(reply)) {
+                replyHandler(WTFMove(reply));
+                return;
+            }
+        }
+
+        replyHandler(Nullopt);
+    });
+}
+
 template<typename T> bool Connection::sendSync(T&& message, typename T::Reply&& reply, uint64_t destinationID, std::chrono::milliseconds timeout, OptionSet<SendSyncOption> sendSyncOptions)
 {
     COMPILE_ASSERT(T::isSync, SyncMessageExpected);
index f3c98df..f904e56 100644 (file)
@@ -5,6 +5,8 @@
 
 namespace IPC {
 
+class Connection;
+
 // Dispatch functions with no reply arguments.
 
 template <typename C, typename MF, typename ArgsTuple, size_t... ArgsIndex>
index 0419579..07aee26 100644 (file)
@@ -43,6 +43,7 @@ namespace WebKit {
 
 class WebProcessPool;
 enum class WebsiteDataType;
+struct WebsiteData;
 
 class DatabaseProcessProxy : public ChildProcessProxy {
 public:
index ed8d545..b113a33 100644 (file)
@@ -51,6 +51,7 @@ class WebProcessPool;
 enum class WebsiteDataFetchOption;
 enum class WebsiteDataType;
 struct NetworkProcessCreationParameters;
+struct WebsiteData;
 
 class NetworkProcessProxy : public ChildProcessProxy, private ProcessThrottlerClient {
 public:
index 16ec28e..263a0db 100644 (file)
@@ -115,7 +115,6 @@ WebProcessProxy::WebProcessProxy(WebProcessPool& processPool)
 
 WebProcessProxy::~WebProcessProxy()
 {
-    ASSERT(m_pendingFetchWebsiteDataCallbacks.isEmpty());
     ASSERT(m_pendingDeleteWebsiteDataCallbacks.isEmpty());
     ASSERT(m_pendingDeleteWebsiteDataForOriginsCallbacks.isEmpty());
     ASSERT(m_pageURLRetainCountMap.isEmpty());
@@ -164,10 +163,6 @@ void WebProcessProxy::processWillShutDown(IPC::Connection& connection)
 {
     ASSERT_UNUSED(connection, this->connection() == &connection);
 
-    for (const auto& callback : m_pendingFetchWebsiteDataCallbacks.values())
-        callback(WebsiteData());
-    m_pendingFetchWebsiteDataCallbacks.clear();
-
     for (const auto& callback : m_pendingDeleteWebsiteDataCallbacks.values())
         callback();
     m_pendingDeleteWebsiteDataCallbacks.clear();
@@ -706,12 +701,6 @@ void WebProcessProxy::shouldTerminate(bool& shouldTerminate)
     }
 }
 
-void WebProcessProxy::didFetchWebsiteData(uint64_t callbackID, const WebsiteData& websiteData)
-{
-    auto callback = m_pendingFetchWebsiteDataCallbacks.take(callbackID);
-    callback(websiteData);
-}
-
 void WebProcessProxy::didDeleteWebsiteData(uint64_t callbackID)
 {
     auto callback = m_pendingDeleteWebsiteDataCallbacks.take(callbackID);
@@ -747,20 +736,22 @@ void WebProcessProxy::windowServerConnectionStateChanged()
         page->viewStateDidChange(ViewState::IsVisuallyIdle);
 }
 
-void WebProcessProxy::fetchWebsiteData(SessionID sessionID, OptionSet<WebsiteDataType> dataTypes, std::function<void (WebsiteData)> completionHandler)
+void WebProcessProxy::fetchWebsiteData(SessionID sessionID, OptionSet<WebsiteDataType> dataTypes, Function<void (WebsiteData)> completionHandler)
 {
     ASSERT(canSendMessage());
 
-    uint64_t callbackID = generateCallbackID();
     auto token = throttler().backgroundActivityToken();
     RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), "%p - WebProcessProxy is taking a background assertion because the Web process is fetching Website data", this);
 
-    m_pendingFetchWebsiteDataCallbacks.add(callbackID, [this, token, completionHandler, sessionID](WebsiteData websiteData) {
-        completionHandler(WTFMove(websiteData));
+    connection()->sendWithReply(Messages::WebProcess::FetchWebsiteData(sessionID, dataTypes), 0, RunLoop::main(), [this, token, completionHandler = WTFMove(completionHandler), sessionID](auto reply) {
+        if (!reply) {
+            completionHandler(WebsiteData { });
+            return;
+        }
+
+        completionHandler(WTFMove(std::get<0>(*reply)));
         RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), "%p - WebProcessProxy is releasing a background assertion because the Web process is done fetching Website data", this);
     });
-
-    send(Messages::WebProcess::FetchWebsiteData(sessionID, dataTypes, callbackID), 0);
 }
 
 void WebProcessProxy::deleteWebsiteData(SessionID sessionID, OptionSet<WebsiteDataType> dataTypes, std::chrono::system_clock::time_point modifiedSince, std::function<void ()> completionHandler)
index 8d01401..e21eeae 100644 (file)
@@ -62,7 +62,8 @@ class WebPageGroup;
 class WebProcessPool;
 enum class WebsiteDataType;
 struct WebNavigationDataStore;
-    
+struct WebsiteData;
+
 class WebProcessProxy : public ChildProcessProxy, ResponsivenessTimer::Client, private ProcessThrottlerClient {
 public:
     typedef HashMap<uint64_t, RefPtr<WebBackForwardListItem>> WebBackForwardListItemMap;
@@ -118,7 +119,7 @@ public:
     void didSaveToPageCache();
     void releasePageCache();
 
-    void fetchWebsiteData(WebCore::SessionID, OptionSet<WebsiteDataType>, std::function<void (WebsiteData)> completionHandler);
+    void fetchWebsiteData(WebCore::SessionID, OptionSet<WebsiteDataType>, Function<void (WebsiteData)> completionHandler);
     void deleteWebsiteData(WebCore::SessionID, OptionSet<WebsiteDataType>, std::chrono::system_clock::time_point modifiedSince, std::function<void ()> completionHandler);
     void deleteWebsiteDataForOrigins(WebCore::SessionID, OptionSet<WebsiteDataType>, const Vector<RefPtr<WebCore::SecurityOrigin>>& origins, std::function<void ()> completionHandler);
 
@@ -169,7 +170,6 @@ private:
 
     void shouldTerminate(bool& shouldTerminate);
 
-    void didFetchWebsiteData(uint64_t callbackID, const WebsiteData&);
     void didDeleteWebsiteData(uint64_t callbackID);
     void didDeleteWebsiteDataForOrigins(uint64_t callbackID);
 
@@ -238,7 +238,6 @@ private:
 
     CustomProtocolManagerProxy m_customProtocolManagerProxy;
 
-    HashMap<uint64_t, std::function<void (WebsiteData)>> m_pendingFetchWebsiteDataCallbacks;
     HashMap<uint64_t, std::function<void ()>> m_pendingDeleteWebsiteDataCallbacks;
     HashMap<uint64_t, std::function<void ()>> m_pendingDeleteWebsiteDataForOriginsCallbacks;
 
index 316776a..0423a3f 100644 (file)
@@ -31,7 +31,6 @@ messages -> WebProcessProxy LegacyReceiver {
     EnableSuddenTermination()
     DisableSuddenTermination()
 
-    DidFetchWebsiteData(uint64_t callbackID, struct WebKit::WebsiteData websiteData)
     DidDeleteWebsiteData(uint64_t callbackID)
     DidDeleteWebsiteDataForOrigins(uint64_t callbackID)
 
index 6c425f1..c90f247 100644 (file)
@@ -1199,16 +1199,12 @@ void WebProcess::releasePageCache()
     PageCache::singleton().pruneToSizeNow(0, PruningReason::MemoryPressure);
 }
 
-void WebProcess::fetchWebsiteData(SessionID sessionID, OptionSet<WebsiteDataType> websiteDataTypes, uint64_t callbackID)
+void WebProcess::fetchWebsiteData(WebCore::SessionID sessionID, OptionSet<WebsiteDataType> websiteDataTypes, WebsiteData& websiteData)
 {
-    WebsiteData websiteData;
-
     if (websiteDataTypes.contains(WebsiteDataType::MemoryCache)) {
         for (auto& origin : MemoryCache::singleton().originsWithCache(sessionID))
             websiteData.entries.append(WebsiteData::Entry { origin, WebsiteDataType::MemoryCache, 0 });
     }
-
-    parentProcessConnection()->send(Messages::WebProcessProxy::DidFetchWebsiteData(callbackID, websiteData), 0);
 }
 
 void WebProcess::deleteWebsiteData(SessionID sessionID, OptionSet<WebsiteDataType> websiteDataTypes, std::chrono::system_clock::time_point modifiedSince, uint64_t callbackID)
index 60feec3..aaad4f2 100644 (file)
@@ -73,6 +73,7 @@ struct SecurityOriginData;
 namespace WebKit {
 
 class EventDispatcher;
+class GamepadData;
 class InjectedBundle;
 class NetworkProcessConnection;
 class ObjCObjectGraph;
@@ -86,11 +87,11 @@ class WebPage;
 class WebPageGroupProxy;
 class WebProcessSupplement;
 enum class WebsiteDataType;
-class GamepadData;
 struct WebPageCreationParameters;
 struct WebPageGroupData;
 struct WebPreferencesStore;
 struct WebProcessCreationParameters;
+struct WebsiteData;
 
 #if ENABLE(DATABASE_PROCESS)
 class WebToDatabaseProcessConnection;
@@ -286,7 +287,7 @@ private:
 
     void releasePageCache();
 
-    void fetchWebsiteData(WebCore::SessionID, OptionSet<WebsiteDataType>, uint64_t callbackID);
+    void fetchWebsiteData(WebCore::SessionID, OptionSet<WebsiteDataType>, WebsiteData&);
     void deleteWebsiteData(WebCore::SessionID, OptionSet<WebsiteDataType>, std::chrono::system_clock::time_point modifiedSince, uint64_t callbackID);
     void deleteWebsiteDataForOrigins(WebCore::SessionID, OptionSet<WebsiteDataType>, const Vector<WebCore::SecurityOriginData>& origins, uint64_t callbackID);
 
index 9363167..c8320be 100644 (file)
@@ -76,7 +76,7 @@ messages -> WebProcess LegacyReceiver {
 
     ReleasePageCache()
 
-    FetchWebsiteData(WebCore::SessionID sessionID, OptionSet<WebKit::WebsiteDataType> websiteDataTypes, uint64_t callbackID)
+    FetchWebsiteData(WebCore::SessionID sessionID, OptionSet<WebKit::WebsiteDataType> websiteDataTypes) -> (struct WebKit::WebsiteData websiteData)
     DeleteWebsiteData(WebCore::SessionID sessionID, OptionSet<WebKit::WebsiteDataType> websiteDataTypes, std::chrono::system_clock::time_point modifiedSince, uint64_t callbackID)
     DeleteWebsiteDataForOrigins(WebCore::SessionID sessionID, OptionSet<WebKit::WebsiteDataType> websiteDataTypes, Vector<WebCore::SecurityOriginData> origins, uint64_t callbackID)