WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
176906
[Curl] Replace the implementation with NetworkLoadMetrics
https://bugs.webkit.org/show_bug.cgi?id=176906
Summary
[Curl] Replace the implementation with NetworkLoadMetrics
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-
Details
Formatted Diff
Diff
Fixed
(19.95 KB, patch)
2017-09-14 13:13 PDT
,
Basuke Suzuki
achristensen
: review-
Details
Formatted Diff
Diff
patch
(20.11 KB, patch)
2017-09-14 14:31 PDT
,
Basuke Suzuki
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Basuke Suzuki
Comment 1
2017-09-14 08:45:05 PDT
Created
attachment 320770
[details]
patch
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
Created
attachment 320804
[details]
Fixed
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
Created
attachment 320824
[details]
patch
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
<
rdar://problem/34693311
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug