Bug 212359

Summary: Expose more network metrics to WebCoreNSURLSession
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cdumez, cmarcelo, darin, ews-watchlist, jer.noble, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

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>