⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 280623 in webkit


Ignore:
Timestamp:
Aug 3, 2021, 5:02:49 PM (5 years ago)
Author:
commit-queue@webkit.org
Message:

Null check self.session after calling _cancel instead of before
https://bugs.webkit.org/show_bug.cgi?id=228757
<rdar://79224868>

Patch by Alex Christensen <achristensen@webkit.org> on 2021-08-03
Reviewed by Geoffrey Garen.

_cancel already null checks self.session before using it.
It seems to be setting self.session to null after the null check, so move the null check to before we use it.
This should fix an occasional crash during teardown.

  • platform/network/cocoa/WebCoreNSURLSession.mm:

(-[WebCoreNSURLSessionDataTask _restart]):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r280601 r280623  
     12021-08-03  Alex Christensen  <achristensen@webkit.org>
     2
     3        Null check self.session after calling _cancel instead of before
     4        https://bugs.webkit.org/show_bug.cgi?id=228757
     5        <rdar://79224868>
     6
     7        Reviewed by Geoffrey Garen.
     8
     9        _cancel already null checks self.session before using it.
     10        It seems to be setting self.session to null after the null check, so move the null check to before we use it.
     11        This should fix an occasional crash during teardown.
     12
     13        * platform/network/cocoa/WebCoreNSURLSession.mm:
     14        (-[WebCoreNSURLSessionDataTask _restart]):
     15
    1162021-08-03  Kimmo Kinnunen  <kkinnunen@apple.com>
    217
  • trunk/Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm

    r278649 r280623  
    718718    ASSERT(isMainThread());
    719719
     720    [self _cancel];
     721
    720722    if (!self.session)
    721723        return;
    722 
    723     [self _cancel];
    724724
    725725    if ([self.session rangeResponseGenerator].willHandleRequest(self, self.originalRequest))
Note: See TracChangeset for help on using the changeset viewer.