Use CompletionHandlers for ResourceHandleClient::didReceiveResponseAsync
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Jan 2018 23:22:19 +0000 (23:22 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Jan 2018 23:22:19 +0000 (23:22 +0000)
https://bugs.webkit.org/show_bug.cgi?id=181961

Reviewed by Michael Catanzaro.

Source/WebCore:

No change in behavior.

* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::didReceiveResponseAsync):
* loader/ResourceLoader.h:
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::didReceiveResponseAsync):
* loader/appcache/ApplicationCacheGroup.h:
* platform/network/BlobResourceHandle.cpp:
(WebCore::BlobResourceHandle::notifyResponseOnSuccess):
(WebCore::BlobResourceHandle::notifyResponseOnError):
(WebCore::BlobResourceHandle::continueDidReceiveResponse): Deleted.
* platform/network/BlobResourceHandle.h:
* platform/network/PingHandle.h:
* platform/network/ResourceHandle.cpp:
(WebCore::ResourceHandle::didReceiveResponse):
* platform/network/ResourceHandle.h:
* platform/network/ResourceHandleClient.h:
* platform/network/SynchronousLoaderClient.cpp:
(WebCore::SynchronousLoaderClient::didReceiveResponseAsync):
* platform/network/SynchronousLoaderClient.h:
* platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::continueDidReceiveResponse): Deleted.
* platform/network/curl/ResourceHandleCurlDelegate.cpp:
(WebCore::ResourceHandleCurlDelegate::curlDidReceiveResponse):
(WebCore::ResourceHandleCurlDelegate::handleDataURL):
(WebCore::ResourceHandleCurlDelegate::continueDidReceiveResponse): Deleted.
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::continueDidReceiveResponse): Deleted.
* platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h:
* platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
(-[WebCoreResourceHandleAsOperationQueueDelegate continueDidReceiveResponse]): Deleted.
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::nextMultipartResponsePartCallback):
(WebCore::sendRequestCallback):
(WebCore::ResourceHandle::continueDidReceiveResponse): Deleted.

Source/WebKit:

* NetworkProcess/Downloads/Download.h:
* NetworkProcess/NetworkLoad.cpp:
* NetworkProcess/NetworkLoad.h:
* NetworkProcess/NetworkResourceLoadParameters.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
* WebProcess/WebPage/mac/WebPageMac.mm:
* WebProcess/WebProcess.cpp:

Source/WebKitLegacy:

* WebCoreSupport/WebResourceLoadScheduler.cpp:

Source/WebKitLegacy/mac:

* WebView/WebPreferences.mm:

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

36 files changed:
Source/WebCore/ChangeLog
Source/WebCore/loader/ResourceLoader.cpp
Source/WebCore/loader/ResourceLoader.h
Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp
Source/WebCore/loader/appcache/ApplicationCacheGroup.h
Source/WebCore/platform/network/BlobResourceHandle.cpp
Source/WebCore/platform/network/BlobResourceHandle.h
Source/WebCore/platform/network/PingHandle.h
Source/WebCore/platform/network/ResourceHandle.cpp
Source/WebCore/platform/network/ResourceHandle.h
Source/WebCore/platform/network/ResourceHandleClient.h
Source/WebCore/platform/network/SynchronousLoaderClient.cpp
Source/WebCore/platform/network/SynchronousLoaderClient.h
Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp
Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegate.h
Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp
Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.h
Source/WebCore/platform/network/curl/ResourceHandleCurl.cpp
Source/WebCore/platform/network/curl/ResourceHandleCurlDelegate.cpp
Source/WebCore/platform/network/mac/ResourceHandleMac.mm
Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h
Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm
Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/Downloads/Download.h
Source/WebKit/NetworkProcess/NetworkLoad.cpp
Source/WebKit/NetworkProcess/NetworkLoad.h
Source/WebKit/NetworkProcess/NetworkResourceLoadParameters.h
Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp
Source/WebKit/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm
Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm
Source/WebKit/WebProcess/WebProcess.cpp
Source/WebKitLegacy/ChangeLog
Source/WebKitLegacy/WebCoreSupport/WebResourceLoadScheduler.cpp
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/WebView/WebPreferences.mm

index 613e798..1ec7b39 100644 (file)
@@ -1,3 +1,49 @@
+2018-01-23  Alex Christensen  <achristensen@webkit.org>
+
+        Use CompletionHandlers for ResourceHandleClient::didReceiveResponseAsync
+        https://bugs.webkit.org/show_bug.cgi?id=181961
+
+        Reviewed by Michael Catanzaro.
+
+        No change in behavior.
+
+        * loader/ResourceLoader.cpp:
+        (WebCore::ResourceLoader::didReceiveResponseAsync):
+        * loader/ResourceLoader.h:
+        * loader/appcache/ApplicationCacheGroup.cpp:
+        (WebCore::ApplicationCacheGroup::didReceiveResponseAsync):
+        * loader/appcache/ApplicationCacheGroup.h:
+        * platform/network/BlobResourceHandle.cpp:
+        (WebCore::BlobResourceHandle::notifyResponseOnSuccess):
+        (WebCore::BlobResourceHandle::notifyResponseOnError):
+        (WebCore::BlobResourceHandle::continueDidReceiveResponse): Deleted.
+        * platform/network/BlobResourceHandle.h:
+        * platform/network/PingHandle.h:
+        * platform/network/ResourceHandle.cpp:
+        (WebCore::ResourceHandle::didReceiveResponse):
+        * platform/network/ResourceHandle.h:
+        * platform/network/ResourceHandleClient.h:
+        * platform/network/SynchronousLoaderClient.cpp:
+        (WebCore::SynchronousLoaderClient::didReceiveResponseAsync):
+        * platform/network/SynchronousLoaderClient.h:
+        * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
+        (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
+        (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::continueDidReceiveResponse): Deleted.
+        * platform/network/curl/ResourceHandleCurlDelegate.cpp:
+        (WebCore::ResourceHandleCurlDelegate::curlDidReceiveResponse):
+        (WebCore::ResourceHandleCurlDelegate::handleDataURL):
+        (WebCore::ResourceHandleCurlDelegate::continueDidReceiveResponse): Deleted.
+        * platform/network/mac/ResourceHandleMac.mm:
+        (WebCore::ResourceHandle::continueDidReceiveResponse): Deleted.
+        * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h:
+        * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
+        (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
+        (-[WebCoreResourceHandleAsOperationQueueDelegate continueDidReceiveResponse]): Deleted.
+        * platform/network/soup/ResourceHandleSoup.cpp:
+        (WebCore::nextMultipartResponsePartCallback):
+        (WebCore::sendRequestCallback):
+        (WebCore::ResourceHandle::continueDidReceiveResponse): Deleted.
+
 2018-01-23  Chris Dumez  <cdumez@apple.com>
 
         Unreviewed, rollout r227216 as it seems to be causing deadlocks
 2018-01-23  Chris Dumez  <cdumez@apple.com>
 
         Unreviewed, rollout r227216 as it seems to be causing deadlocks
index 122142f..5a63264 100644 (file)
@@ -657,14 +657,14 @@ void ResourceLoader::didSendData(ResourceHandle*, unsigned long long bytesSent,
     didSendData(bytesSent, totalBytesToBeSent);
 }
 
     didSendData(bytesSent, totalBytesToBeSent);
 }
 
-void ResourceLoader::didReceiveResponseAsync(ResourceHandle* handle, ResourceResponse&& response)
+void ResourceLoader::didReceiveResponseAsync(ResourceHandle*, ResourceResponse&& response, CompletionHandler<void()>&& completionHandler)
 {
     if (documentLoader()->applicationCacheHost().maybeLoadFallbackForResponse(this, response)) {
 {
     if (documentLoader()->applicationCacheHost().maybeLoadFallbackForResponse(this, response)) {
-        handle->continueDidReceiveResponse();
+        completionHandler();
         return;
     }
     didReceiveResponse(response);
         return;
     }
     didReceiveResponse(response);
-    handle->continueDidReceiveResponse();
+    completionHandler();
 }
 
 void ResourceLoader::didReceiveData(ResourceHandle*, const char* data, unsigned length, int encodedDataLength)
 }
 
 void ResourceLoader::didReceiveData(ResourceHandle*, const char* data, unsigned length, int encodedDataLength)
index 497d7ae..1886d4b 100644 (file)
@@ -182,7 +182,7 @@ private:
 
     // ResourceHandleClient
     void didSendData(ResourceHandle*, unsigned long long bytesSent, unsigned long long totalBytesToBeSent) override;
 
     // ResourceHandleClient
     void didSendData(ResourceHandle*, unsigned long long bytesSent, unsigned long long totalBytesToBeSent) override;
-    void didReceiveResponseAsync(ResourceHandle*, ResourceResponse&&) override;
+    void didReceiveResponseAsync(ResourceHandle*, ResourceResponse&&, CompletionHandler<void()>&&) override;
     void willSendRequestAsync(ResourceHandle*, ResourceRequest&&, ResourceResponse&&, CompletionHandler<void(ResourceRequest&&)>&&) override;
     void didReceiveData(ResourceHandle*, const char*, unsigned, int encodedDataLength) override;
     void didReceiveBuffer(ResourceHandle*, Ref<SharedBuffer>&&, int encodedDataLength) override;
     void willSendRequestAsync(ResourceHandle*, ResourceRequest&&, ResourceResponse&&, CompletionHandler<void(ResourceRequest&&)>&&) override;
     void didReceiveData(ResourceHandle*, const char*, unsigned, int encodedDataLength) override;
     void didReceiveBuffer(ResourceHandle*, Ref<SharedBuffer>&&, int encodedDataLength) override;
index fa354ff..e513bf3 100644 (file)
@@ -489,14 +489,14 @@ RefPtr<ResourceHandle> ApplicationCacheGroup::createResourceHandle(const URL& ur
     return handle;
 }
 
     return handle;
 }
 
-void ApplicationCacheGroup::didReceiveResponseAsync(ResourceHandle* handle, ResourceResponse&& response)
+void ApplicationCacheGroup::didReceiveResponseAsync(ResourceHandle* handle, ResourceResponse&& response, CompletionHandler<void()>&& completionHandler)
 {
     ASSERT(m_frame);
     InspectorInstrumentation::didReceiveResourceResponse(*m_frame, m_currentResourceIdentifier, m_frame->loader().documentLoader(), response, nullptr);
 
     if (handle == m_manifestHandle) {
         didReceiveManifestResponse(response);
 {
     ASSERT(m_frame);
     InspectorInstrumentation::didReceiveResourceResponse(*m_frame, m_currentResourceIdentifier, m_frame->loader().documentLoader(), response, nullptr);
 
     if (handle == m_manifestHandle) {
         didReceiveManifestResponse(response);
-        handle->continueDidReceiveResponse();
+        completionHandler();
         return;
     }
 
         return;
     }
 
@@ -523,7 +523,7 @@ void ApplicationCacheGroup::didReceiveResponseAsync(ResourceHandle* handle, Reso
             m_currentHandle = nullptr;
             // Load the next resource, if any.
             startLoadingEntry();
             m_currentHandle = nullptr;
             // Load the next resource, if any.
             startLoadingEntry();
-            handle->continueDidReceiveResponse();
+            completionHandler();
             return;
         }
         // The server could return 304 for an unconditional request - in this case, we handle the response as a normal error.
             return;
         }
         // The server could return 304 for an unconditional request - in this case, we handle the response as a normal error.
@@ -555,12 +555,12 @@ void ApplicationCacheGroup::didReceiveResponseAsync(ResourceHandle* handle, Reso
             // Load the next resource, if any.
             startLoadingEntry();
         }
             // Load the next resource, if any.
             startLoadingEntry();
         }
-        handle->continueDidReceiveResponse();
+        completionHandler();
         return;
     }
     
     m_currentResource = ApplicationCacheResource::create(url, response, type);
         return;
     }
     
     m_currentResource = ApplicationCacheResource::create(url, response, type);
-    handle->continueDidReceiveResponse();
+    completionHandler();
 }
 
 void ApplicationCacheGroup::willSendRequestAsync(ResourceHandle*, ResourceRequest&& request, ResourceResponse&&, CompletionHandler<void(ResourceRequest&&)>&& completionHandler)
 }
 
 void ApplicationCacheGroup::willSendRequestAsync(ResourceHandle*, ResourceRequest&& request, ResourceResponse&&, CompletionHandler<void(ResourceRequest&&)>&& completionHandler)
index bbd5804..46a8edb 100644 (file)
@@ -109,7 +109,7 @@ private:
     bool shouldUseCredentialStorage(ResourceHandle*) override { return true; }
 
     // ResourceHandleClient
     bool shouldUseCredentialStorage(ResourceHandle*) override { return true; }
 
     // ResourceHandleClient
-    void didReceiveResponseAsync(ResourceHandle*, ResourceResponse&&) final;
+    void didReceiveResponseAsync(ResourceHandle*, ResourceResponse&&, CompletionHandler<void()>&&) final;
     void willSendRequestAsync(ResourceHandle*, ResourceRequest&&, ResourceResponse&&, CompletionHandler<void(ResourceRequest&&)>&&) final;
 #if USE(PROTECTION_SPACE_AUTH_CALLBACK)
     void canAuthenticateAgainstProtectionSpaceAsync(ResourceHandle*, const ProtectionSpace&) final;
     void willSendRequestAsync(ResourceHandle*, ResourceRequest&&, ResourceResponse&&, CompletionHandler<void(ResourceRequest&&)>&&) final;
 #if USE(PROTECTION_SPACE_AUTH_CALLBACK)
     void canAuthenticateAgainstProtectionSpaceAsync(ResourceHandle*, const ProtectionSpace&) final;
index e6cee97..a4ea684 100644 (file)
@@ -75,7 +75,7 @@ class BlobResourceSynchronousLoader : public ResourceHandleClient {
 public:
     BlobResourceSynchronousLoader(ResourceError&, ResourceResponse&, Vector<char>&);
 
 public:
     BlobResourceSynchronousLoader(ResourceError&, ResourceResponse&, Vector<char>&);
 
-    void didReceiveResponseAsync(ResourceHandle*, ResourceResponse&&) final;
+    void didReceiveResponseAsync(ResourceHandle*, ResourceResponse&&, CompletionHandler<void()>&&) final;
     void didFail(ResourceHandle*, const ResourceError&) final;
     void willSendRequestAsync(ResourceHandle*, ResourceRequest&&, ResourceResponse&&, CompletionHandler<void(ResourceRequest&&)>&&) final;
 #if USE(PROTECTION_SPACE_AUTH_CALLBACK)
     void didFail(ResourceHandle*, const ResourceError&) final;
     void willSendRequestAsync(ResourceHandle*, ResourceRequest&&, ResourceResponse&&, CompletionHandler<void(ResourceRequest&&)>&&) final;
 #if USE(PROTECTION_SPACE_AUTH_CALLBACK)
@@ -109,12 +109,12 @@ void BlobResourceSynchronousLoader::canAuthenticateAgainstProtectionSpaceAsync(R
 }
 #endif
 
 }
 #endif
 
-void BlobResourceSynchronousLoader::didReceiveResponseAsync(ResourceHandle* handle, ResourceResponse&& response)
+void BlobResourceSynchronousLoader::didReceiveResponseAsync(ResourceHandle* handle, ResourceResponse&& response, CompletionHandler<void()>&& completionHandler)
 {
     // We cannot handle the size that is more than maximum integer.
     if (response.expectedContentLength() > INT_MAX) {
         m_error = ResourceError(webKitBlobResourceDomain, static_cast<int>(BlobResourceHandle::Error::NotReadableError), response.url(), "File is too large");
 {
     // We cannot handle the size that is more than maximum integer.
     if (response.expectedContentLength() > INT_MAX) {
         m_error = ResourceError(webKitBlobResourceDomain, static_cast<int>(BlobResourceHandle::Error::NotReadableError), response.url(), "File is too large");
-        handle->continueDidReceiveResponse();
+        completionHandler();
         return;
     }
 
         return;
     }
 
@@ -123,7 +123,7 @@ void BlobResourceSynchronousLoader::didReceiveResponseAsync(ResourceHandle* hand
     // Read all the data.
     m_data.resize(static_cast<size_t>(response.expectedContentLength()));
     static_cast<BlobResourceHandle*>(handle)->readSync(m_data.data(), static_cast<int>(m_data.size()));
     // Read all the data.
     m_data.resize(static_cast<size_t>(response.expectedContentLength()));
     static_cast<BlobResourceHandle*>(handle)->readSync(m_data.data(), static_cast<int>(m_data.size()));
-    handle->continueDidReceiveResponse();
+    completionHandler();
 }
 
 void BlobResourceSynchronousLoader::didFail(ResourceHandle*, const ResourceError& error)
 }
 
 void BlobResourceSynchronousLoader::didFail(ResourceHandle*, const ResourceError& error)
@@ -176,12 +176,6 @@ void BlobResourceHandle::cancel()
     ResourceHandle::cancel();
 }
 
     ResourceHandle::cancel();
 }
 
-void BlobResourceHandle::continueDidReceiveResponse()
-{
-    m_buffer.resize(bufferSize);
-    readAsync();
-}
-
 void BlobResourceHandle::start()
 {
     if (!m_async) {
 void BlobResourceHandle::start()
 {
     if (!m_async) {
@@ -584,7 +578,10 @@ void BlobResourceHandle::notifyResponseOnSuccess()
     // as if the response had a Content-Disposition header with the filename parameter set to the File's name attribute.
     // Notably, this will affect a name suggested in "File Save As".
 
     // as if the response had a Content-Disposition header with the filename parameter set to the File's name attribute.
     // Notably, this will affect a name suggested in "File Save As".
 
-    client()->didReceiveResponseAsync(this, WTFMove(response));
+    client()->didReceiveResponseAsync(this, WTFMove(response), [this, protectedThis = makeRef(*this)] {
+        m_buffer.resize(bufferSize);
+        readAsync();
+    });
 }
 
 void BlobResourceHandle::notifyResponseOnError()
 }
 
 void BlobResourceHandle::notifyResponseOnError()
@@ -607,7 +604,10 @@ void BlobResourceHandle::notifyResponseOnError()
         break;
     }
 
         break;
     }
 
-    client()->didReceiveResponseAsync(this, WTFMove(response));
+    client()->didReceiveResponseAsync(this, WTFMove(response), [this, protectedThis = makeRef(*this)] {
+        m_buffer.resize(bufferSize);
+        readAsync();
+    });
 }
 
 void BlobResourceHandle::notifyReceiveData(const char* data, int bytesRead)
 }
 
 void BlobResourceHandle::notifyReceiveData(const char* data, int bytesRead)
index f88217e..f948263 100644 (file)
@@ -75,7 +75,6 @@ private:
 
     // ResourceHandle methods.
     void cancel() override;
 
     // ResourceHandle methods.
     void cancel() override;
-    void continueDidReceiveResponse() override;
 
     void doStart();
     void getSizeForNext();
 
     void doStart();
     void getSizeForNext();
index 7ae144d..48782ac 100644 (file)
@@ -67,9 +67,9 @@ private:
         completionHandler({ });
         pingLoadComplete(ResourceError { String(), 0, m_currentRequest.url(), ASCIILiteral("Not allowed to follow redirects"), ResourceError::Type::AccessControl });
     }
         completionHandler({ });
         pingLoadComplete(ResourceError { String(), 0, m_currentRequest.url(), ASCIILiteral("Not allowed to follow redirects"), ResourceError::Type::AccessControl });
     }
-    void didReceiveResponseAsync(ResourceHandle*, ResourceResponse&& response) final
+    void didReceiveResponseAsync(ResourceHandle*, ResourceResponse&& response, CompletionHandler<void()>&& completionHandler) final
     {
     {
-        m_handle->continueDidReceiveResponse();
+        completionHandler();
         pingLoadComplete({ }, response);
     }
     void didReceiveBuffer(ResourceHandle*, Ref<SharedBuffer>&&, int) final { pingLoadComplete(); }
         pingLoadComplete({ }, response);
     }
     void didReceiveBuffer(ResourceHandle*, Ref<SharedBuffer>&&, int) final { pingLoadComplete(); }
index a92e1a6..491434d 100644 (file)
@@ -33,6 +33,7 @@
 #include "ResourceHandleClient.h"
 #include "Timer.h"
 #include <algorithm>
 #include "ResourceHandleClient.h"
 #include "Timer.h"
 #include <algorithm>
+#include <wtf/CompletionHandler.h>
 #include <wtf/MainThread.h>
 #include <wtf/NeverDestroyed.h>
 #include <wtf/text/AtomicStringHash.h>
 #include <wtf/MainThread.h>
 #include <wtf/NeverDestroyed.h>
 #include <wtf/text/AtomicStringHash.h>
@@ -150,7 +151,7 @@ void ResourceHandle::clearClient()
     d->m_client = nullptr;
 }
 
     d->m_client = nullptr;
 }
 
-void ResourceHandle::didReceiveResponse(ResourceResponse&& response)
+void ResourceHandle::didReceiveResponse(ResourceResponse&& response, CompletionHandler<void()>&& completionHandler)
 {
     if (response.isHTTP09()) {
         auto url = response.url();
 {
     if (response.isHTTP09()) {
         auto url = response.url();
@@ -159,11 +160,11 @@ void ResourceHandle::didReceiveResponse(ResourceResponse&& response)
             cancel();
             String message = "Cancelled load from '" + url.stringCenterEllipsizedToLength() + "' because it is using HTTP/0.9.";
             d->m_client->didFail(this, { String(), 0, url, message });
             cancel();
             String message = "Cancelled load from '" + url.stringCenterEllipsizedToLength() + "' because it is using HTTP/0.9.";
             d->m_client->didFail(this, { String(), 0, url, message });
-            continueDidReceiveResponse();
+            completionHandler();
             return;
         }
     }
             return;
         }
     }
-    client()->didReceiveResponseAsync(this, WTFMove(response));
+    client()->didReceiveResponseAsync(this, WTFMove(response), WTFMove(completionHandler));
 }
 
 #if !USE(SOUP) && !USE(CURL)
 }
 
 #if !USE(SOUP) && !USE(CURL)
index f2e1068..6215407 100644 (file)
@@ -107,7 +107,7 @@ public:
     void willSendRequest(ResourceRequest&&, ResourceResponse&&, CompletionHandler<void(ResourceRequest&&)>&&);
 #endif
 
     void willSendRequest(ResourceRequest&&, ResourceResponse&&, CompletionHandler<void(ResourceRequest&&)>&&);
 #endif
 
-    void didReceiveResponse(ResourceResponse&&);
+    void didReceiveResponse(ResourceResponse&&, CompletionHandler<void()>&&);
 
     bool shouldUseCredentialStorage();
     void didReceiveAuthenticationChallenge(const AuthenticationChallenge&);
 
     bool shouldUseCredentialStorage();
     void didReceiveAuthenticationChallenge(const AuthenticationChallenge&);
@@ -193,9 +193,6 @@ public:
     WEBCORE_EXPORT ResourceHandleClient* client() const;
     WEBCORE_EXPORT void clearClient();
 
     WEBCORE_EXPORT ResourceHandleClient* client() const;
     WEBCORE_EXPORT void clearClient();
 
-    // Called in response to ResourceHandleClient::didReceiveResponseAsync().
-    WEBCORE_EXPORT virtual void continueDidReceiveResponse();
-
 #if USE(PROTECTION_SPACE_AUTH_CALLBACK)
     // Called in response to ResourceHandleClient::canAuthenticateAgainstProtectionSpaceAsync().
     WEBCORE_EXPORT void continueCanAuthenticateAgainstProtectionSpace(bool);
 #if USE(PROTECTION_SPACE_AUTH_CALLBACK)
     // Called in response to ResourceHandleClient::canAuthenticateAgainstProtectionSpaceAsync().
     WEBCORE_EXPORT void continueCanAuthenticateAgainstProtectionSpace(bool);
index f32c9bb..ef94649 100644 (file)
@@ -77,8 +77,7 @@ public:
 
     WEBCORE_EXPORT virtual void willSendRequestAsync(ResourceHandle*, ResourceRequest&&, ResourceResponse&&, CompletionHandler<void(ResourceRequest&&)>&&) = 0;
 
 
     WEBCORE_EXPORT virtual void willSendRequestAsync(ResourceHandle*, ResourceRequest&&, ResourceResponse&&, CompletionHandler<void(ResourceRequest&&)>&&) = 0;
 
-    // Client will call ResourceHandle::continueDidReceiveResponse() when ready.
-    WEBCORE_EXPORT virtual void didReceiveResponseAsync(ResourceHandle*, ResourceResponse&&) = 0;
+    WEBCORE_EXPORT virtual void didReceiveResponseAsync(ResourceHandle*, ResourceResponse&&, CompletionHandler<void()>&&) = 0;
 
 #if USE(PROTECTION_SPACE_AUTH_CALLBACK)
     // Client will pass an updated request using ResourceHandle::continueCanAuthenticateAgainstProtectionSpace() when ready.
 
 #if USE(PROTECTION_SPACE_AUTH_CALLBACK)
     // Client will pass an updated request using ResourceHandle::continueCanAuthenticateAgainstProtectionSpace() when ready.
index fdb9427..4f12026 100644 (file)
@@ -62,10 +62,10 @@ void SynchronousLoaderClient::canAuthenticateAgainstProtectionSpaceAsync(Resourc
 }
 #endif
 
 }
 #endif
 
-void SynchronousLoaderClient::didReceiveResponseAsync(ResourceHandle* handle, ResourceResponse&& response)
+void SynchronousLoaderClient::didReceiveResponseAsync(ResourceHandle*, ResourceResponse&& response, CompletionHandler<void()>&& completionHandler)
 {
     m_response = WTFMove(response);
 {
     m_response = WTFMove(response);
-    handle->continueDidReceiveResponse();
+    completionHandler();
 }
 
 void SynchronousLoaderClient::didReceiveData(ResourceHandle*, const char* data, unsigned length, int /*encodedDataLength*/)
 }
 
 void SynchronousLoaderClient::didReceiveData(ResourceHandle*, const char* data, unsigned length, int /*encodedDataLength*/)
index 9664c2c..fe67bd6 100644 (file)
@@ -49,7 +49,7 @@ private:
     void willSendRequestAsync(ResourceHandle*, ResourceRequest&&, ResourceResponse&&, CompletionHandler<void(ResourceRequest&&)>&&) override;
     bool shouldUseCredentialStorage(ResourceHandle*) override;
     void didReceiveAuthenticationChallenge(ResourceHandle*, const AuthenticationChallenge&) override;
     void willSendRequestAsync(ResourceHandle*, ResourceRequest&&, ResourceResponse&&, CompletionHandler<void(ResourceRequest&&)>&&) override;
     bool shouldUseCredentialStorage(ResourceHandle*) override;
     void didReceiveAuthenticationChallenge(ResourceHandle*, const AuthenticationChallenge&) override;
-    void didReceiveResponseAsync(ResourceHandle*, ResourceResponse&&) override;
+    void didReceiveResponseAsync(ResourceHandle*, ResourceResponse&&, CompletionHandler<void()>&&) override;
     void didReceiveData(ResourceHandle*, const char*, unsigned, int /*encodedDataLength*/) override;
     void didFinishLoading(ResourceHandle*) override;
     void didFail(ResourceHandle*, const ResourceError&) override;
     void didReceiveData(ResourceHandle*, const char*, unsigned, int /*encodedDataLength*/) override;
     void didFinishLoading(ResourceHandle*) override;
     void didFail(ResourceHandle*, const ResourceError&) override;
index 50ee3ef..0ad7ba2 100644 (file)
@@ -657,11 +657,6 @@ const ResourceRequest& ResourceHandle::currentRequest() const
     return d->m_currentRequest;
 }
 
     return d->m_currentRequest;
 }
 
-void ResourceHandle::continueDidReceiveResponse()
-{
-    d->m_connectionDelegate->continueDidReceiveResponse();
-}
-
 #if USE(PROTECTION_SPACE_AUTH_CALLBACK)
 void ResourceHandle::continueCanAuthenticateAgainstProtectionSpace(bool canAuthenticate)
 {
 #if USE(PROTECTION_SPACE_AUTH_CALLBACK)
 void ResourceHandle::continueCanAuthenticateAgainstProtectionSpace(bool canAuthenticate)
 {
index 5b16830..3d373e3 100644 (file)
@@ -46,7 +46,6 @@ public:
     virtual void setupConnectionScheduling(CFURLConnectionRef) = 0;
     virtual void releaseHandle();
 
     virtual void setupConnectionScheduling(CFURLConnectionRef) = 0;
     virtual void releaseHandle();
 
-    virtual void continueDidReceiveResponse() = 0;
     virtual void continueWillCacheResponse(CFCachedURLResponseRef) = 0;
 #if USE(PROTECTION_SPACE_AUTH_CALLBACK)
     virtual void continueCanAuthenticateAgainstProtectionSpace(bool) = 0;
     virtual void continueWillCacheResponse(CFCachedURLResponseRef) = 0;
 #if USE(PROTECTION_SPACE_AUTH_CALLBACK)
     virtual void continueCanAuthenticateAgainstProtectionSpace(bool) = 0;
index daab493..ee0c52a 100644 (file)
@@ -180,30 +180,30 @@ CFURLRequestRef ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSen
 void ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse(CFURLConnectionRef connection, CFURLResponseRef cfResponse)
 {
     auto protectedThis = makeRef(*this);
 void ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse(CFURLConnectionRef connection, CFURLResponseRef cfResponse)
 {
     auto protectedThis = makeRef(*this);
-    auto work = [protectedThis = makeRef(*this), cfResponse = RetainPtr<CFURLResponseRef>(cfResponse), connection = RetainPtr<CFURLConnectionRef>(connection)] () {
-        auto& handle = protectedThis->m_handle;
-        
-        if (!protectedThis->hasHandle() || !handle->client() || !handle->connection()) {
-            protectedThis->continueDidReceiveResponse();
+    auto work = [this, protectedThis = makeRef(*this), cfResponse = RetainPtr<CFURLResponseRef>(cfResponse), connection = RetainPtr<CFURLConnectionRef>(connection)] () mutable {
+        if (!hasHandle() || !m_handle->client() || !m_handle->connection()) {
+            m_semaphore.signal();
             return;
         }
 
             return;
         }
 
-        LOG(Network, "CFNet - ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse(handle=%p) (%s)", handle, handle->firstRequest().url().string().utf8().data());
+        LOG(Network, "CFNet - ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse(handle=%p) (%s)", m_handle, m_handle->firstRequest().url().string().utf8().data());
 
         // Avoid MIME type sniffing if the response comes back as 304 Not Modified.
         auto msg = CFURLResponseGetHTTPResponse(cfResponse.get());
         int statusCode = msg ? CFHTTPMessageGetResponseStatusCode(msg) : 0;
 
         if (statusCode != 304) {
 
         // Avoid MIME type sniffing if the response comes back as 304 Not Modified.
         auto msg = CFURLResponseGetHTTPResponse(cfResponse.get());
         int statusCode = msg ? CFHTTPMessageGetResponseStatusCode(msg) : 0;
 
         if (statusCode != 304) {
-            bool isMainResourceLoad = handle->firstRequest().requester() == ResourceRequest::Requester::Main;
+            bool isMainResourceLoad = m_handle->firstRequest().requester() == ResourceRequest::Requester::Main;
         }
 
         }
 
-        if (_CFURLRequestCopyProtocolPropertyForKey(handle->firstRequest().cfURLRequest(DoNotUpdateHTTPBody), CFSTR("ForceHTMLMIMEType")))
+        if (_CFURLRequestCopyProtocolPropertyForKey(m_handle->firstRequest().cfURLRequest(DoNotUpdateHTTPBody), CFSTR("ForceHTMLMIMEType")))
             CFURLResponseSetMIMEType(cfResponse.get(), CFSTR("text/html"));
 
         ResourceResponse resourceResponse(cfResponse.get());
         resourceResponse.setSource(ResourceResponse::Source::Network);
             CFURLResponseSetMIMEType(cfResponse.get(), CFSTR("text/html"));
 
         ResourceResponse resourceResponse(cfResponse.get());
         resourceResponse.setSource(ResourceResponse::Source::Network);
-        handle->didReceiveResponse(WTFMove(resourceResponse));
+        m_handle->didReceiveResponse(WTFMove(resourceResponse), [this, protectedThis = WTFMove(protectedThis)] {
+            m_semaphore.signal();
+        });
     };
 
     if (m_messageQueue)
     };
 
     if (m_messageQueue)
@@ -389,11 +389,6 @@ void ResourceHandleCFURLConnectionDelegateWithOperationQueue::continueCanAuthent
 }
 #endif // USE(PROTECTION_SPACE_AUTH_CALLBACK)
 
 }
 #endif // USE(PROTECTION_SPACE_AUTH_CALLBACK)
 
-void ResourceHandleCFURLConnectionDelegateWithOperationQueue::continueDidReceiveResponse()
-{
-    m_semaphore.signal();
-}
-
 void ResourceHandleCFURLConnectionDelegateWithOperationQueue::continueWillCacheResponse(CFCachedURLResponseRef response)
 {
     m_cachedResponseResult = response;
 void ResourceHandleCFURLConnectionDelegateWithOperationQueue::continueWillCacheResponse(CFCachedURLResponseRef response)
 {
     m_cachedResponseResult = response;
index 5a3f5a3..09a6f00 100644 (file)
@@ -58,7 +58,6 @@ private:
     void didSendBodyData(CFIndex totalBytesWritten, CFIndex totalBytesExpectedToWrite) override;
     Boolean shouldUseCredentialStorage() override;
 
     void didSendBodyData(CFIndex totalBytesWritten, CFIndex totalBytesExpectedToWrite) override;
     Boolean shouldUseCredentialStorage() override;
 
-    void continueDidReceiveResponse() override;
     void continueWillCacheResponse(CFCachedURLResponseRef) override;
 #if USE(PROTECTION_SPACE_AUTH_CALLBACK)
     Boolean canRespondToProtectionSpace(CFURLProtectionSpaceRef) override;
     void continueWillCacheResponse(CFCachedURLResponseRef) override;
 #if USE(PROTECTION_SPACE_AUTH_CALLBACK)
     Boolean canRespondToProtectionSpace(CFURLProtectionSpaceRef) override;
index b684bc0..2081544 100644 (file)
@@ -38,6 +38,7 @@
 #include "Logging.h"
 #include "ResourceHandleInternal.h"
 #include "SynchronousLoaderClient.h"
 #include "Logging.h"
 #include "ResourceHandleInternal.h"
 #include "SynchronousLoaderClient.h"
+#include <wtf/CompletionHandler.h>
 
 namespace WebCore {
 
 
 namespace WebCore {
 
@@ -214,8 +215,12 @@ void ResourceHandle::receivedRequestToContinueWithoutCredential(const Authentica
 
     clearAuthentication();
 
 
     clearAuthentication();
 
-    auto protectedThis = makeRef(*this);
-    didReceiveResponse(ResourceResponse(d->m_response));
+    didReceiveResponse(ResourceResponse(d->m_response), [this, protectedThis = makeRef(*this)] {
+        ASSERT(isMainThread());
+
+        if (d->m_delegate)
+            d->m_delegate->continueDidReceiveResponse();
+    });
 }
 
 void ResourceHandle::receivedCancellation(const AuthenticationChallenge& challenge)
 }
 
 void ResourceHandle::receivedCancellation(const AuthenticationChallenge& challenge)
@@ -259,14 +264,6 @@ void ResourceHandle::platformLoadResourceSynchronously(NetworkingContext* contex
     response = client.response();
 }
 
     response = client.response();
 }
 
-void ResourceHandle::continueDidReceiveResponse()
-{
-    ASSERT(isMainThread());
-
-    if (d->m_delegate)
-        d->m_delegate->continueDidReceiveResponse();
-}
-
 void ResourceHandle::platformContinueSynchronousDidReceiveResponse()
 {
     ASSERT(isMainThread());
 void ResourceHandle::platformContinueSynchronousDidReceiveResponse()
 {
     ASSERT(isMainThread());
index 84e1fda..d373af6 100644 (file)
@@ -221,7 +221,9 @@ void ResourceHandleCurlDelegate::curlDidReceiveResponse(const CurlResponse& rece
         CurlCacheManager::singleton().didReceiveResponse(*m_handle, response());
 
         auto protectedThis = makeRef(*m_handle);
         CurlCacheManager::singleton().didReceiveResponse(*m_handle, response());
 
         auto protectedThis = makeRef(*m_handle);
-        m_handle->didReceiveResponse(ResourceResponse(response()));
+        m_handle->didReceiveResponse(ResourceResponse(response()), [this, protectedThis = makeRef(*this)] {
+            continueAfterDidReceiveResponse();
+        });
     }
 }
 
     }
 }
 
@@ -426,7 +428,9 @@ void ResourceHandleCurlDelegate::handleDataURL()
 
     if (base64) {
         data = decodeURLEscapeSequences(data);
 
     if (base64) {
         data = decodeURLEscapeSequences(data);
-        m_handle->didReceiveResponse(WTFMove(response));
+        m_handle->didReceiveResponse(WTFMove(response), [this, protectedThis = makeRef(*this)] {
+            continueAfterDidReceiveResponse();
+        });
 
         // didReceiveResponse might cause the client to be deleted.
         if (m_handle->client()) {
 
         // didReceiveResponse might cause the client to be deleted.
         if (m_handle->client()) {
@@ -437,7 +441,9 @@ void ResourceHandleCurlDelegate::handleDataURL()
     } else {
         TextEncoding encoding(charset);
         data = decodeURLEscapeSequences(data, encoding);
     } else {
         TextEncoding encoding(charset);
         data = decodeURLEscapeSequences(data, encoding);
-        m_handle->didReceiveResponse(WTFMove(response));
+        m_handle->didReceiveResponse(WTFMove(response), [this, protectedThis = makeRef(*this)] {
+            continueAfterDidReceiveResponse();
+        });
 
         // didReceiveResponse might cause the client to be deleted.
         if (m_handle->client()) {
 
         // didReceiveResponse might cause the client to be deleted.
         if (m_handle->client()) {
index 0fd780b..ef61b93 100644 (file)
@@ -471,11 +471,6 @@ void ResourceHandle::willSendRequest(ResourceRequest&& request, ResourceResponse
     });
 }
 
     });
 }
 
-void ResourceHandle::continueDidReceiveResponse()
-{
-    [delegate() continueDidReceiveResponse];
-}
-
 void ResourceHandle::didReceiveAuthenticationChallenge(const AuthenticationChallenge& challenge)
 {
     ASSERT(!d->m_currentMacChallenge);
 void ResourceHandle::didReceiveAuthenticationChallenge(const AuthenticationChallenge& challenge)
 {
     ASSERT(!d->m_currentMacChallenge);
index 56f4e6d..fd2bd0c 100644 (file)
@@ -47,7 +47,6 @@ class ResourceHandle;
 
 - (void)detachHandle;
 - (id)initWithHandle:(WebCore::ResourceHandle*)handle messageQueue:(MessageQueue<Function<void()>>*)messageQueue;
 
 - (void)detachHandle;
 - (id)initWithHandle:(WebCore::ResourceHandle*)handle messageQueue:(MessageQueue<Function<void()>>*)messageQueue;
-- (void)continueDidReceiveResponse;
 - (void)continueCanAuthenticateAgainstProtectionSpace:(BOOL)canAuthenticate;
 - (void)continueWillCacheResponse:(NSCachedURLResponse *)response;
 @end
 - (void)continueCanAuthenticateAgainstProtectionSpace:(BOOL)canAuthenticate;
 - (void)continueWillCacheResponse:(NSCachedURLResponse *)response;
 @end
index bbe6b51..9ac734e 100644 (file)
@@ -108,11 +108,6 @@ static bool scheduledWithCustomRunLoopMode(SchedulePairHashSet* pairs)
     [super dealloc];
 }
 
     [super dealloc];
 }
 
-- (void)continueDidReceiveResponse
-{
-    dispatch_semaphore_signal(m_semaphore);
-}
-
 - (void)continueCanAuthenticateAgainstProtectionSpace:(BOOL)canAuthenticate
 {
     m_boolResult = canAuthenticate;
 - (void)continueCanAuthenticateAgainstProtectionSpace:(BOOL)canAuthenticate
 {
     m_boolResult = canAuthenticate;
@@ -230,7 +225,9 @@ static bool scheduledWithCustomRunLoopMode(SchedulePairHashSet* pairs)
         resourceResponse.setSource(ResourceResponse::Source::Network);
         ResourceHandle::getConnectionTimingData(connection.get(), resourceResponse.deprecatedNetworkLoadMetrics());
 
         resourceResponse.setSource(ResourceResponse::Source::Network);
         ResourceHandle::getConnectionTimingData(connection.get(), resourceResponse.deprecatedNetworkLoadMetrics());
 
-        m_handle->didReceiveResponse(WTFMove(resourceResponse));
+        m_handle->didReceiveResponse(WTFMove(resourceResponse), [self, protectedSelf = WTFMove(protectedSelf)] {
+            dispatch_semaphore_signal(m_semaphore);
+        });
     };
 
     [self callFunctionOnMainThread:WTFMove(work)];
     };
 
     [self callFunctionOnMainThread:WTFMove(work)];
index b253dc5..da1bdd8 100644 (file)
@@ -463,7 +463,9 @@ static void nextMultipartResponsePartCallback(GObject* /*source*/, GAsyncResult*
 
     d->m_previousPosition = 0;
 
 
     d->m_previousPosition = 0;
 
-    handle->didReceiveResponse(ResourceResponse(d->m_response));
+    handle->didReceiveResponse(ResourceResponse(d->m_response), [handle = makeRef(*handle)] {
+        continueAfterDidReceiveResponse(handle.ptr());
+    });
 }
 
 static void sendRequestCallback(GObject*, GAsyncResult* result, gpointer data)
 }
 
 static void sendRequestCallback(GObject*, GAsyncResult* result, gpointer data)
@@ -520,7 +522,9 @@ static void sendRequestCallback(GObject*, GAsyncResult* result, gpointer data)
     else
         d->m_inputStream = inputStream;
 
     else
         d->m_inputStream = inputStream;
 
-    handle->didReceiveResponse(ResourceResponse(d->m_response));
+    handle->didReceiveResponse(ResourceResponse(d->m_response), [handle = makeRef(*handle)] {
+        continueAfterDidReceiveResponse(handle.ptr());
+    });
 }
 
 void ResourceHandle::platformContinueSynchronousDidReceiveResponse()
 }
 
 void ResourceHandle::platformContinueSynchronousDidReceiveResponse()
@@ -1019,11 +1023,6 @@ static void readCallback(GObject*, GAsyncResult* asyncResult, gpointer data)
         d->m_cancellable.get(), readCallback, handle.get());
 }
 
         d->m_cancellable.get(), readCallback, handle.get());
 }
 
-void ResourceHandle::continueDidReceiveResponse()
-{
-    continueAfterDidReceiveResponse(this);
-}
-
 }
 
 #endif
 }
 
 #endif
index 2167952..0e6ca15 100644 (file)
@@ -1,3 +1,19 @@
+2018-01-23  Alex Christensen  <achristensen@webkit.org>
+
+        Use CompletionHandlers for ResourceHandleClient::didReceiveResponseAsync
+        https://bugs.webkit.org/show_bug.cgi?id=181961
+
+        Reviewed by Michael Catanzaro.
+
+        * NetworkProcess/Downloads/Download.h:
+        * NetworkProcess/NetworkLoad.cpp:
+        * NetworkProcess/NetworkLoad.h:
+        * NetworkProcess/NetworkResourceLoadParameters.h:
+        * WebProcess/InjectedBundle/InjectedBundle.cpp:
+        * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
+        * WebProcess/WebPage/mac/WebPageMac.mm:
+        * WebProcess/WebProcess.cpp:
+
 2018-01-23  Chris Dumez  <cdumez@apple.com>
 
         Unreviewed, rollout r227216 as it seems to be causing deadlocks
 2018-01-23  Chris Dumez  <cdumez@apple.com>
 
         Unreviewed, rollout r227216 as it seems to be causing deadlocks
index c66bb01..590f9eb 100644 (file)
@@ -30,8 +30,6 @@
 #include "NetworkDataTask.h"
 #include "SandboxExtension.h"
 #include <WebCore/AuthenticationChallenge.h>
 #include "NetworkDataTask.h"
 #include "SandboxExtension.h"
 #include <WebCore/AuthenticationChallenge.h>
-#include <WebCore/ResourceHandle.h>
-#include <WebCore/ResourceHandleClient.h>
 #include <WebCore/ResourceRequest.h>
 #include <memory>
 #include <pal/SessionID.h>
 #include <WebCore/ResourceRequest.h>
 #include <memory>
 #include <pal/SessionID.h>
index f24446c..158e5cf 100644 (file)
@@ -34,7 +34,6 @@
 #include "WebCoreArgumentCoders.h"
 #include "WebErrors.h"
 #include <WebCore/NotImplemented.h>
 #include "WebCoreArgumentCoders.h"
 #include "WebErrors.h"
 #include <WebCore/NotImplemented.h>
-#include <WebCore/ResourceHandle.h>
 #include <WebCore/ResourceRequest.h>
 #include <WebCore/SharedBuffer.h>
 #include <pal/SessionID.h>
 #include <WebCore/ResourceRequest.h>
 #include <WebCore/SharedBuffer.h>
 #include <pal/SessionID.h>
index bbef88e..02edab9 100644 (file)
@@ -31,7 +31,6 @@
 #include "NetworkLoadParameters.h"
 #include "RemoteNetworkingContext.h"
 #include <WebCore/AuthenticationChallenge.h>
 #include "NetworkLoadParameters.h"
 #include "RemoteNetworkingContext.h"
 #include <WebCore/AuthenticationChallenge.h>
-#include <WebCore/ResourceHandleClient.h>
 #include <wtf/CompletionHandler.h>
 #include <wtf/Optional.h>
 
 #include <wtf/CompletionHandler.h>
 #include <wtf/Optional.h>
 
index c2918ef..77de855 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef NetworkResourceLoadParameters_h
-#define NetworkResourceLoadParameters_h
+#pragma once
 
 #include "NetworkLoadParameters.h"
 #include "SandboxExtension.h"
 #include "WebCompiledContentRuleListData.h"
 #include <WebCore/ContentSecurityPolicyResponseHeaders.h>
 #include <WebCore/FetchOptions.h>
 
 #include "NetworkLoadParameters.h"
 #include "SandboxExtension.h"
 #include "WebCompiledContentRuleListData.h"
 #include <WebCore/ContentSecurityPolicyResponseHeaders.h>
 #include <WebCore/FetchOptions.h>
-#include <WebCore/ResourceHandle.h>
 #include <WebCore/ResourceLoaderOptions.h>
 #include <WebCore/ResourceRequest.h>
 #include <WebCore/SecurityOrigin.h>
 #include <WebCore/ResourceLoaderOptions.h>
 #include <WebCore/ResourceRequest.h>
 #include <WebCore/SecurityOrigin.h>
@@ -68,5 +66,3 @@ public:
 };
 
 } // namespace WebKit
 };
 
 } // namespace WebKit
-
-#endif // NetworkResourceLoadParameters_h
index d481ca5..1790722 100644 (file)
@@ -68,7 +68,6 @@
 #include <WebCore/Page.h>
 #include <WebCore/PageGroup.h>
 #include <WebCore/PrintContext.h>
 #include <WebCore/Page.h>
 #include <WebCore/PageGroup.h>
 #include <WebCore/PrintContext.h>
-#include <WebCore/ResourceHandle.h>
 #include <WebCore/RuntimeEnabledFeatures.h>
 #include <WebCore/SWContextManager.h>
 #include <WebCore/ScriptController.h>
 #include <WebCore/RuntimeEnabledFeatures.h>
 #include <WebCore/SWContextManager.h>
 #include <WebCore/ScriptController.h>
index ac2ca4c..65292d1 100644 (file)
@@ -48,7 +48,6 @@
 #import <WebCore/Page.h>
 #import <WebCore/Pasteboard.h>
 #import <WebCore/RenderImage.h>
 #import <WebCore/Page.h>
 #import <WebCore/Pasteboard.h>
 #import <WebCore/RenderImage.h>
-#import <WebCore/ResourceHandle.h>
 #import <WebCore/StringTruncator.h>
 #import <WebCore/WebCoreNSURLExtras.h>
 #import <wtf/StdLibExtras.h>
 #import <WebCore/StringTruncator.h>
 #import <WebCore/WebCoreNSURLExtras.h>
 #import <wtf/StdLibExtras.h>
index f00ae9c..d61715e 100644 (file)
@@ -83,7 +83,6 @@
 #import <WebCore/RenderObject.h>
 #import <WebCore/RenderStyle.h>
 #import <WebCore/RenderView.h>
 #import <WebCore/RenderObject.h>
 #import <WebCore/RenderStyle.h>
 #import <WebCore/RenderView.h>
-#import <WebCore/ResourceHandle.h>
 #import <WebCore/RuntimeApplicationChecks.h>
 #import <WebCore/ScrollView.h>
 #import <WebCore/StyleInheritedData.h>
 #import <WebCore/RuntimeApplicationChecks.h>
 #import <WebCore/ScrollView.h>
 #import <WebCore/StyleInheritedData.h>
index bc7f99a..9074269 100644 (file)
 #include <WebCore/PageCache.h>
 #include <WebCore/PageGroup.h>
 #include <WebCore/PlatformMediaSessionManager.h>
 #include <WebCore/PageCache.h>
 #include <WebCore/PageGroup.h>
 #include <WebCore/PlatformMediaSessionManager.h>
-#include <WebCore/ResourceHandle.h>
 #include <WebCore/ResourceLoadObserver.h>
 #include <WebCore/ResourceLoadStatistics.h>
 #include <WebCore/RuntimeApplicationChecks.h>
 #include <WebCore/ResourceLoadObserver.h>
 #include <WebCore/ResourceLoadStatistics.h>
 #include <WebCore/RuntimeApplicationChecks.h>
index 7fcb776..e6e0858 100644 (file)
@@ -1,3 +1,12 @@
+2018-01-23  Alex Christensen  <achristensen@webkit.org>
+
+        Use CompletionHandlers for ResourceHandleClient::didReceiveResponseAsync
+        https://bugs.webkit.org/show_bug.cgi?id=181961
+
+        Reviewed by Michael Catanzaro.
+
+        * WebCoreSupport/WebResourceLoadScheduler.cpp:
+
 2018-01-16  Fujii Hironori  <Hironori.Fujii@sony.com>
 
         [CMake] Remove WebCoreDerivedSources library target
 2018-01-16  Fujii Hironori  <Hironori.Fujii@sony.com>
 
         [CMake] Remove WebCoreDerivedSources library target
index 350f041..303a2d0 100644 (file)
@@ -32,7 +32,6 @@
 #include <WebCore/NetscapePlugInStreamLoader.h>
 #include <WebCore/PingHandle.h>
 #include <WebCore/PlatformStrategies.h>
 #include <WebCore/NetscapePlugInStreamLoader.h>
 #include <WebCore/PingHandle.h>
 #include <WebCore/PlatformStrategies.h>
-#include <WebCore/ResourceHandle.h>
 #include <WebCore/ResourceRequest.h>
 #include <WebCore/SubresourceLoader.h>
 #include <WebCore/URL.h>
 #include <WebCore/ResourceRequest.h>
 #include <WebCore/SubresourceLoader.h>
 #include <WebCore/URL.h>
index 6185bbd..9afa175 100644 (file)
@@ -1,3 +1,12 @@
+2018-01-23  Alex Christensen  <achristensen@webkit.org>
+
+        Use CompletionHandlers for ResourceHandleClient::didReceiveResponseAsync
+        https://bugs.webkit.org/show_bug.cgi?id=181961
+
+        Reviewed by Michael Catanzaro.
+
+        * WebView/WebPreferences.mm:
+
 2018-01-23  Commit Queue  <commit-queue@webkit.org>
 
         Unreviewed, rolling out r227437.
 2018-01-23  Commit Queue  <commit-queue@webkit.org>
 
         Unreviewed, rolling out r227437.
index fc86b6e..001645b 100644 (file)
@@ -42,7 +42,6 @@
 #import <WebCore/DeprecatedGlobalSettings.h>
 #import <WebCore/NetworkStorageSession.h>
 #import <WebCore/PlatformCookieJar.h>
 #import <WebCore/DeprecatedGlobalSettings.h>
 #import <WebCore/NetworkStorageSession.h>
 #import <WebCore/PlatformCookieJar.h>
-#import <WebCore/ResourceHandle.h>
 #import <WebCore/RuntimeApplicationChecks.h>
 #import <WebCore/Settings.h>
 #import <WebCore/TextEncodingRegistry.h>
 #import <WebCore/RuntimeApplicationChecks.h>
 #import <WebCore/Settings.h>
 #import <WebCore/TextEncodingRegistry.h>