Changeset 223995 in webkit
- Timestamp:
- Oct 25, 2017 4:39:09 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r223994 r223995 1 2017-10-25 Basuke Suzuki <Basuke.Suzuki@sony.com> 2 3 [Curl] Delete temporally downloaded file when it cancelled 4 https://bugs.webkit.org/show_bug.cgi?id=134393 5 6 Reviewed by Alex Christensen. 7 8 * platform/network/curl/CurlRequest.cpp: 9 (WebCore::CurlRequest::didCancelTransfer): 10 (WebCore::CurlRequest::writeDataToDownloadFileIfEnabled): 11 (WebCore::CurlRequest::closeDownloadFile): 12 (WebCore::CurlRequest::cleanupDownloadFile): 13 * platform/network/curl/CurlRequest.h: 14 1 15 2017-10-25 Youenn Fablet <youenn@apple.com> 2 16 -
trunk/Source/WebCore/platform/network/curl/CurlRequest.cpp
r223838 r223995 378 378 { 379 379 finalizeTransfer(); 380 cleanupDownloadFile(); 380 381 } 381 382 … … 611 612 void CurlRequest::writeDataToDownloadFileIfEnabled(const SharedBuffer& buffer) 612 613 { 613 LockHolder locker(m_downloadMutex); 614 615 if (!m_isEnabledDownloadToFile) 616 return; 617 618 if (m_downloadFilePath.isEmpty()) 619 m_downloadFilePath = openTemporaryFile("download", m_downloadFileHandle); 614 { 615 LockHolder locker(m_downloadMutex); 616 617 if (!m_isEnabledDownloadToFile) 618 return; 619 620 if (m_downloadFilePath.isEmpty()) 621 m_downloadFilePath = openTemporaryFile("download", m_downloadFileHandle); 622 } 620 623 621 624 if (m_downloadFileHandle != invalidPlatformFileHandle) … … 630 633 return; 631 634 632 WebCore::closeFile(m_downloadFileHandle);635 closeFile(m_downloadFileHandle); 633 636 m_downloadFileHandle = invalidPlatformFileHandle; 634 637 } 635 638 639 void CurlRequest::cleanupDownloadFile() 640 { 641 LockHolder locker(m_downloadMutex); 642 643 if (!m_downloadFilePath.isEmpty()) { 644 deleteFile(m_downloadFilePath); 645 m_downloadFilePath = String(); 646 } 647 } 648 636 649 CURLcode CurlRequest::willSetupSslCtxCallback(CURL*, void* sslCtx, void* userData) 637 650 { -
trunk/Source/WebCore/platform/network/curl/CurlRequest.h
r223838 r223995 118 118 void writeDataToDownloadFileIfEnabled(const SharedBuffer&); 119 119 void closeDownloadFile(); 120 void cleanupDownloadFile(); 120 121 121 122 // Callback functions for curl
Note: See TracChangeset
for help on using the changeset viewer.