Use BlobResourceHandle when loading blob urls, even when using NetworkSession
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Feb 2016 19:49:38 +0000 (19:49 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Feb 2016 19:49:38 +0000 (19:49 +0000)
commit96309ec9bae162a03d9f249013ed70ea0846cf73
tree14f5cce0f920f5e7d5ad6db37e7e4e87c6868ef7
parent8e4b2fc500e0272a9232c7cebdf93255c6714acd
Use BlobResourceHandle when loading blob urls, even when using NetworkSession
https://bugs.webkit.org/show_bug.cgi?id=154096

Reviewed by Brady Eidson.

This fixes at least http/tests/xmlhttprequest/blob-request-byte-range.html.

* NetworkProcess/NetworkDataTask.h:
Renamed NetworkDataTaskClient::didReceiveResponse to didReceiveResponseNetworkSession
to avoid conflicting with ResourceHandleClient::didReceiveResponse.
* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::NetworkLoad):
Make a BlobResourceHandle instead of a NetworkDataTask if we have a request for a blob url.
(WebKit::NetworkLoad::~NetworkLoad):
(WebKit::NetworkLoad::setDefersLoading):
(WebKit::NetworkLoad::cancel):
(WebKit::NetworkLoad::continueWillSendRequest):
(WebKit::NetworkLoad::continueDidReceiveResponse):
(WebKit::NetworkLoad::sharedDidReceiveResponse):
(WebKit::NetworkLoad::convertTaskToDownload):
(WebKit::NetworkLoad::setPendingDownloadID):
(WebKit::NetworkLoad::didReceiveChallenge):
(WebKit::NetworkLoad::didReceiveResponseNetworkSession):
(WebKit::NetworkLoad::cannotShowURL):
(WebKit::NetworkLoad::didReceiveResponseAsync):
(WebKit::NetworkLoad::willSendRequestAsync):
(WebKit::NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync):
(WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
(WebKit::NetworkLoad::supportsDataArray):
(WebKit::NetworkLoad::didReceiveDataArray):
(WebKit::NetworkLoad::didSendData):
(WebKit::NetworkLoad::receivedCancellation):
(WebKit::NetworkLoad::didReceiveResponse): Deleted.
Compile ResourceHandleClient when using NetworkSession because it is used for blobs now.
Also, add null checks because we now have NetworkLoads where either m_task or m_handle is always null.
* NetworkProcess/NetworkLoad.h:
(WebKit::NetworkLoad::pendingDownloadID):
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
* NetworkProcess/mac/NetworkLoadMac.mm:
(WebKit::NetworkLoad::willCacheResponseAsync):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@196428 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/NetworkProcess/NetworkDataTask.h
Source/WebKit2/NetworkProcess/NetworkLoad.cpp
Source/WebKit2/NetworkProcess/NetworkLoad.h
Source/WebKit2/NetworkProcess/cocoa/NetworkSessionCocoa.mm
Source/WebKit2/NetworkProcess/mac/NetworkLoadMac.mm