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

Changeset 280693 in webkit


Ignore:
Timestamp:
Aug 5, 2021, 9:26:53 AM (5 years ago)
Author:
Russell Epstein
Message:

Cherry-pick r280623. rdar://problem/81517664

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]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280623 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Location:
branches/safari-612.1.27.0-branch/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-612.1.27.0-branch/Source/WebCore/ChangeLog

    r280642 r280693  
     12021-08-05  Russell Epstein  <repstein@apple.com>
     2
     3        Cherry-pick r280623. rdar://problem/81517664
     4
     5    Null check self.session after calling _cancel instead of before
     6    https://bugs.webkit.org/show_bug.cgi?id=228757
     7    <rdar://79224868>
     8   
     9    Patch by Alex Christensen <achristensen@webkit.org> on 2021-08-03
     10    Reviewed by Geoffrey Garen.
     11   
     12    _cancel already null checks self.session before using it.
     13    It seems to be setting self.session to null after the null check, so move the null check to before we use it.
     14    This should fix an occasional crash during teardown.
     15   
     16    * platform/network/cocoa/WebCoreNSURLSession.mm:
     17    (-[WebCoreNSURLSessionDataTask _restart]):
     18   
     19    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280623 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     20
     21    2021-08-03  Alex Christensen  <achristensen@webkit.org>
     22
     23            Null check self.session after calling _cancel instead of before
     24            https://bugs.webkit.org/show_bug.cgi?id=228757
     25            <rdar://79224868>
     26
     27            Reviewed by Geoffrey Garen.
     28
     29            _cancel already null checks self.session before using it.
     30            It seems to be setting self.session to null after the null check, so move the null check to before we use it.
     31            This should fix an occasional crash during teardown.
     32
     33            * platform/network/cocoa/WebCoreNSURLSession.mm:
     34            (-[WebCoreNSURLSessionDataTask _restart]):
     35
    1362021-08-04  Russell Epstein  <repstein@apple.com>
    237
  • branches/safari-612.1.27.0-branch/Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm

    r278649 r280693  
    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.