[webkit-changes] [WebKit/WebKit] bc5b02: [cocoa] Ensure NetworkSession's SessionWrapper is ...

Matthew Finkel noreply at github.com
Fri Apr 14 16:56:01 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: bc5b02ef9cceb4336d9b899eb4f8232dcdfb66cb
      https://github.com/WebKit/WebKit/commit/bc5b02ef9cceb4336d9b899eb4f8232dcdfb66cb
  Author: Matthew Finkel <sysrqb at apple.com>
  Date:   2023-04-14 (Fri, 14 Apr 2023)

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

  Log Message:
  -----------
  [cocoa] Ensure NetworkSession's SessionWrapper is still valid in decision handler
https://bugs.webkit.org/show_bug.cgi?id=255464
rdar://107972282

Reviewed by Alex Christensen.

This is a speculative fix for a crash that seems to happen when a Session is
invalidated between the time that the decision handler is created and when it
is executed. _sessionWrapper is a WeakPtr that has a different lifetime than
the owning WKNetworkSessionDelegate object.

* Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):

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




More information about the webkit-changes mailing list