[webkit-changes] [WebKit/WebKit] d24e5f: [Cocoa] Add telemetry for load failures caused by ...

Wenson Hsieh noreply at github.com
Mon Feb 6 12:27:42 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d24e5f4ed53b371a945f324805758edccb55b73f
      https://github.com/WebKit/WebKit/commit/d24e5f4ed53b371a945f324805758edccb55b73f
  Author: Wenson Hsieh <wenson_hsieh at apple.com>
  Date:   2023-02-06 (Mon, 06 Feb 2023)

  Changed paths:
    M Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
    M Source/WebKit/Shared/mac/WebCoreArgumentCodersMac.mm

  Log Message:
  -----------
  [Cocoa] Add telemetry for load failures caused by DNS resolution errors
https://bugs.webkit.org/show_bug.cgi?id=251742
rdar://104767598

Reviewed by Tim Horton.

Surface a dictionary containing more information about DNS resolution failures in the network
process, through the UI-process side navigation delegate. This dictionary contains basic information
derived from the DNS resolution failure report (`nw_resolution_report_t`) as well as path
information (`nw_path_t`) that's bubbled up to WebKit, through CFNetwork.

Clients can use this information for debugging purposes, as well as providing additional telemetry.
See below for more details.

* Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(description):
(extractResolutionReport):
(-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
* Source/WebKit/Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::isSafeToEncodeUserInfo):

Currently, when serializing `NSError`s, we only attempt to serialize values in the user info
dictionary that are one of the following types that are safe to encode: `NSURL`, `NSString`, or
`NSNumber`. In order to propagate the new user info entry above to the UI process, we augment this
rule so that we also serialize Objective-C dictionaries and arrays that, in turn, only contain data
types that are safe to encode.

(IPC::encodeNSError):

Canonical link: https://commits.webkit.org/259908@main




More information about the webkit-changes mailing list