Bug 176906

Summary: [Curl] Replace the implementation with NetworkLoadMetrics
Product: WebKit Reporter: Basuke Suzuki <basuke>
Component: WebCore Misc.Assignee: Basuke Suzuki <basuke>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, basuke, bfulgham, buildbot, commit-queue, don.olmstead, galpeter, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch
achristensen: review-
Fixed
achristensen: review-
patch none

Basuke Suzuki
Reported 2017-09-14 08:33:41 PDT
Web timing related information gathering is redundant in Curl port. We replace them with NetworkLoadMetrics class and set the network load metrics correctly.
Attachments
patch (8.74 KB, patch)
2017-09-14 08:45 PDT, Basuke Suzuki
achristensen: review-
Fixed (19.95 KB, patch)
2017-09-14 13:13 PDT, Basuke Suzuki
achristensen: review-
patch (20.11 KB, patch)
2017-09-14 14:31 PDT, Basuke Suzuki
no flags
Basuke Suzuki
Comment 1 2017-09-14 08:45:05 PDT
Alex Christensen
Comment 2 2017-09-14 10:59:10 PDT
Comment on attachment 320770 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=320770&action=review > Source/WebCore/platform/network/curl/CurlContext.h:294 > + CURLcode getTimes(double&, double&, double&, double&, double&) const; We're trying to move away from passing return value references in as parameters. Let's make this be a function that takes no parameters and returns a std::optional<NetworkLoadMetrics> or if you actually need the code a WTF::Expected<NetworkLoadMetrics, CURLcode>. The functions above it could use the same improvement.
Alex Christensen
Comment 3 2017-09-14 11:43:30 PDT
Other than that this looks good.
Basuke Suzuki
Comment 4 2017-09-14 13:13:55 PDT
Build Bot
Comment 5 2017-09-14 13:15:43 PDT
Attachment 320804 [details] did not pass style-queue: ERROR: Source/WebCore/ChangeLog:8: You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible. [changelog/nonewtests] [5] Total errors found: 1 in 7 files If any of these errors are false positives, please file a bug against check-webkit-style.
Alex Christensen
Comment 6 2017-09-14 13:25:12 PDT
Comment on attachment 320804 [details] Fixed View in context: https://bugs.webkit.org/attachment.cgi?id=320804&action=review > Source/WebCore/platform/network/curl/CurlContext.cpp:590 > +std::optional<long> CurlHandle::getPrimaryPort() Ports are uint16_t's. It might be worth range checking and returning a std::optional<uint16_t> > Source/WebCore/platform/network/curl/CurlDownload.cpp:186 > + if (*httpCode >= 200 && *httpCode < 300) { This is now unchecked use of a std::optional.
Basuke Suzuki
Comment 7 2017-09-14 14:31:37 PDT
WebKit Commit Bot
Comment 8 2017-09-14 17:29:50 PDT
Comment on attachment 320824 [details] patch Clearing flags on attachment: 320824 Committed r222068: <http://trac.webkit.org/changeset/222068>
WebKit Commit Bot
Comment 9 2017-09-14 17:29:52 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 10 2017-09-27 12:27:25 PDT
Note You need to log in before you can comment on or make changes to this bug.