Bug 212359 - Expose more network metrics to WebCoreNSURLSession
Summary: Expose more network metrics to WebCoreNSURLSession
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-05-25 12:13 PDT by Alex Christensen
Modified: 2020-05-25 17:04 PDT (History)
7 users (show)

See Also:


Attachments
Patch (8.55 KB, patch)
2020-05-25 12:14 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (8.79 KB, patch)
2020-05-25 16:21 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2020-05-25 12:13:26 PDT
Expose more network metrics to WebCoreNSURLSession
Comment 1 Alex Christensen 2020-05-25 12:14:38 PDT
Created attachment 400212 [details]
Patch
Comment 2 Darin Adler 2020-05-25 14:29:58 PDT
Comment on attachment 400212 [details]
Patch

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

> Source/WTF/wtf/PlatformHave.h:407
> +#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000)

The second half of this expression has the mistake Tim Horton mentioned recently, where it checks IOS_FAMILY, but checks __IPHONE_OS_VERSION_MIN_REQUIRED, which is frozen at an old value on watchOS and tvOS. It should either just check PLATFORM(IOS) and accept this will be false for tvOS and watchOS, or add minimum versions for those platforms.
Comment 3 Alex Christensen 2020-05-25 16:21:23 PDT
Created attachment 400224 [details]
Patch
Comment 4 Alex Christensen 2020-05-25 16:22:12 PDT
Comment on attachment 400224 [details]
Patch

Since the API is public and clearly marked available on all platforms, I'll expand the good pattern in PlatformHave.h.
Comment 5 Darin Adler 2020-05-25 16:26:32 PDT
Comment on attachment 400224 [details]
Patch

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

> Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm:149
> +- (BOOL)cellular

Why does the code above say "getter=isCellular" but here it’s named "cellular"?

How do we test that this is correctly named or not?
Comment 6 EWS 2020-05-25 17:03:19 PDT
Committed r262131: <https://trac.webkit.org/changeset/262131>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 400224 [details].
Comment 7 Radar WebKit Bug Importer 2020-05-25 17:04:22 PDT
<rdar://problem/63607042>