SpeculativeLoad should use CompletionHandler
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Oct 2019 16:37:13 +0000 (16:37 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Oct 2019 16:37:13 +0000 (16:37 +0000)
https://bugs.webkit.org/show_bug.cgi?id=202795

Patch by Rob Buis <rbuis@igalia.com> on 2019-10-10
Reviewed by Chris Dumez.

SpeculativeLoad should use CompletionHandler, as remarked in
Bug 201641 review.

* NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:

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

Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/cache/NetworkCacheSpeculativeLoad.h

index 8c636f9..5e1a11b 100644 (file)
@@ -1,3 +1,15 @@
+2019-10-10  Rob Buis  <rbuis@igalia.com>
+
+        SpeculativeLoad should use CompletionHandler
+        https://bugs.webkit.org/show_bug.cgi?id=202795
+
+        Reviewed by Chris Dumez.
+
+        SpeculativeLoad should use CompletionHandler, as remarked in
+        Bug 201641 review.
+
+        * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
+
 2019-10-10  Wenson Hsieh  <wenson_hsieh@apple.com>
 
         Support programmatic paste requests on macOS
index 6ce77f9..5406d9f 100644 (file)
@@ -33,6 +33,7 @@
 #include <WebCore/ResourceRequest.h>
 #include <WebCore/ResourceResponse.h>
 #include <WebCore/SharedBuffer.h>
+#include <wtf/CompletionHandler.h>
 
 namespace WebKit {
 
@@ -43,7 +44,7 @@ namespace NetworkCache {
 class SpeculativeLoad final : public NetworkLoadClient {
     WTF_MAKE_FAST_ALLOCATED;
 public:
-    typedef Function<void (std::unique_ptr<NetworkCache::Entry>)> RevalidationCompletionHandler;
+    using RevalidationCompletionHandler = CompletionHandler<void(std::unique_ptr<NetworkCache::Entry>)>;
     SpeculativeLoad(Cache&, const GlobalFrameID&, const WebCore::ResourceRequest&, std::unique_ptr<NetworkCache::Entry>, RevalidationCompletionHandler&&);
 
     virtual ~SpeculativeLoad();