Bug 240293

Summary: [WinCairo] Support file downloads
Product: WebKit Reporter: Yury Semikhatsky <yurys>
Component: WebKit2Assignee: Yury Semikhatsky <yurys>
Status: RESOLVED FIXED    
Severity: Normal CC: annulen, Basuke.Suzuki, conojab991, don.olmstead, ews-watchlist, galpeter, gyuyoung.kim, Hironori.Fujii, kkinnunen, ryuan.choi, sergio, takashi.komori, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: PC   
OS: Windows 10   
Bug Depends on:    
Bug Blocks: 234887    
Attachments:
Description Flags
Patch
none
Patch none

Description Yury Semikhatsky 2022-05-10 17:39:11 PDT
[WinCairo] Support file downloads
Comment 1 Yury Semikhatsky 2022-05-10 17:46:51 PDT
Created attachment 459142 [details]
Patch
Comment 2 Fujii Hironori 2022-05-11 00:56:04 PDT
Comment on attachment 459142 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=459142&action=review

> Source/WebKit/ChangeLog:8
> +        Hooked up Curl calls to Download callbacks. Added basix support for

basix → basic

> Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.cpp:194
> +            FileSystem::writeToFile(m_downloadDestinationFile, segment.data(), segment.size());

Why do you ignore the return value of writeToFile?
Comment 3 Yury Semikhatsky 2022-05-11 12:37:43 PDT
Comment on attachment 459142 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=459142&action=review

>> Source/WebKit/ChangeLog:8
>> +        Hooked up Curl calls to Download callbacks. Added basix support for
> 
> basix → basic

Done.

>> Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.cpp:194
>> +            FileSystem::writeToFile(m_downloadDestinationFile, segment.data(), segment.size());
> 
> Why do you ignore the return value of writeToFile?

Fixed. Added error handling.
Comment 4 Yury Semikhatsky 2022-05-11 12:38:45 PDT
Created attachment 459177 [details]
Patch
Comment 5 Fujii Hironori 2022-05-11 14:03:39 PDT
Comment on attachment 459177 [details]
Patch

LGTM
Comment 6 EWS 2022-05-11 14:59:07 PDT
Committed r294077 (250472@main): <https://commits.webkit.org/250472@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 459177 [details].
Comment 7 Radar WebKit Bug Importer 2022-05-11 15:00:15 PDT
<rdar://problem/93131394>
Comment 8 Don Olmstead 2022-05-27 12:39:52 PDT
*** Bug 234887 has been marked as a duplicate of this bug. ***