[webkit-changes] [WebKit/WebKit] 6fb617: Some data task signposts are not ended properly

bnham noreply at github.com
Fri Feb 3 11:04:52 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6fb617ebe42bf0dfa70e4936776152d667990351
      https://github.com/WebKit/WebKit/commit/6fb617ebe42bf0dfa70e4936776152d667990351
  Author: Ben Nham <nham at apple.com>
  Date:   2023-02-03 (Fri, 03 Feb 2023)

  Changed paths:
    M Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm

  Log Message:
  -----------
  Some data task signposts are not ended properly
https://bugs.webkit.org/show_bug.cgi?id=251630
rdar://104976161

Reviewed by Alex Christensen.

Sometimes, when a data task is cancelled, the didCompleteWithError method is not called. Since that
is where we end data task signposts, this can lead to dropped signposts and incorrectly attributed
resource loads in perf traces.

To fix this, move the end signpost call to the destructor instead. This matches the begin signpost
call, which occurs in the constructor.

Note that this only affects behavior when a perf tracing tool is explicitly enabled; these signposts
are disabled otherwise.

* Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
(WebKit::NetworkDataTaskCocoa::~NetworkDataTaskCocoa):
(WebKit::NetworkDataTaskCocoa::didCompleteWithError):

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




More information about the webkit-changes mailing list