Bug 240293 - [WinCairo] Support file downloads
Summary: [WinCairo] Support file downloads
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Windows 10
: P2 Normal
Assignee: Yury Semikhatsky
URL:
Keywords: InRadar
Depends on:
Blocks: 234887
  Show dependency treegraph
 
Reported: 2022-05-10 17:39 PDT by Yury Semikhatsky
Modified: 2022-05-11 15:00 PDT (History)
12 users (show)

See Also:


Attachments
Patch (13.65 KB, patch)
2022-05-10 17:46 PDT, Yury Semikhatsky
no flags Details | Formatted Diff | Diff
Patch (14.09 KB, patch)
2022-05-11 12:38 PDT, Yury Semikhatsky
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>