Changeset 206988 in webkit
- Timestamp:
- Oct 10, 2016 12:45:52 AM (8 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r206987 r206988 1 2016-10-10 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 NetworkSession: downloads started by startDownload() can fail before starting from the API point of view 4 https://bugs.webkit.org/show_bug.cgi?id=163107 5 6 Reviewed by Alex Christensen. 7 8 In the network process we use a PendingDownload in this case, but in the UI process we always have a single 9 download proxy. If an error happens before the pending download is converted inot a real download, the DidFail 10 messages is received in the download proxy before the DidStart one. This is problematic at least for the GTK+ 11 API, because it's common to connect to the started signal and connect to all other signals from there, but in 12 this case the started signal is never emitted, and then the failed one is not handled. This is not a problem for 13 downloads started by convertTaskToDownload, because in that case those loads are not considered a download by 14 the UI process when those early errors happen, and then the web page handles them. 15 16 * NetworkProcess/Downloads/PendingDownload.cpp: 17 (WebKit::PendingDownload::PendingDownload): Send DidStart message right after the network load starts like the 18 non network session code does. 19 * NetworkProcess/NetworkLoad.cpp: 20 (WebKit::NetworkLoad::convertTaskToDownload): Send DidStart message now that the normal load has been converted 21 into a download. 22 * NetworkProcess/NetworkProcess.cpp: 23 (WebKit::NetworkProcess::findPendingDownloadLocation): Do not send DidStart message here. 24 1 25 2016-10-10 Carlos Garcia Campos <cgarcia@igalia.com> 2 26 -
trunk/Source/WebKit2/NetworkProcess/Downloads/PendingDownload.cpp
r206583 r206988 45 45 m_networkLoad->setPendingDownload(*this); 46 46 m_networkLoad->setSuggestedFilename(suggestedName); 47 48 send(Messages::DownloadProxy::DidStart(m_networkLoad->currentRequest(), suggestedName)); 47 49 } 48 50 -
trunk/Source/WebKit2/NetworkProcess/NetworkLoad.cpp
r206583 r206988 25 25 26 26 #include "config.h" 27 28 27 #include "NetworkLoad.h" 29 28 30 29 #include "AuthenticationManager.h" 30 #include "DownloadProxyMessages.h" 31 31 #include "NetworkProcess.h" 32 32 #include "SessionTracker.h" 33 #include "WebCoreArgumentCoders.h" 33 34 #include "WebErrors.h" 34 35 #include <WebCore/NotImplemented.h> 35 36 #include <WebCore/ResourceHandle.h> 37 #include <WebCore/ResourceRequest.h> 36 38 #include <WebCore/SessionID.h> 37 39 #include <WebCore/SharedBuffer.h> … … 188 190 return; 189 191 192 NetworkProcess::singleton().downloadManager().downloadProxyConnection()->send(Messages::DownloadProxy::DidStart(updatedRequest, String()), downloadID.downloadID()); 190 193 m_task->setPendingDownloadID(downloadID); 191 194 -
trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp
r206604 r206988 514 514 { 515 515 uint64_t destinationID = networkDataTask.pendingDownloadID().downloadID(); 516 downloadProxyConnection()->send(Messages::DownloadProxy::DidStart(updatedRequest, String()), destinationID);517 516 downloadProxyConnection()->send(Messages::DownloadProxy::DidReceiveResponse(response), destinationID); 518 517
Note: See TracChangeset
for help on using the changeset viewer.