Changeset 212330 in webkit


Ignore:
Timestamp:
Feb 14, 2017 3:26:38 PM (7 years ago)
Author:
beidson@apple.com
Message:

Speculative fix for: Crash in DocumentThreadableLoader::redirectReceived.
<rdar://problem/29899473> and https://bugs.webkit.org/show_bug.cgi?id=168337

Reviewed by Geoffrey Garen.

No new tests (Unable to find a reproduction).

  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::loadRequest):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r212329 r212330  
     12017-02-14  Brady Eidson  <beidson@apple.com>
     2
     3        Speculative fix for: Crash in DocumentThreadableLoader::redirectReceived.
     4        <rdar://problem/29899473> and https://bugs.webkit.org/show_bug.cgi?id=168337
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        No new tests (Unable to find a reproduction).
     9
     10        * loader/DocumentThreadableLoader.cpp:
     11        (WebCore::DocumentThreadableLoader::loadRequest):
     12
    1132017-02-14  Youenn Fablet  <youenn@apple.com>
    214
  • trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp

    r211758 r212330  
    367367void DocumentThreadableLoader::loadRequest(ResourceRequest&& request, SecurityCheckPolicy securityCheck)
    368368{
     369    Ref<DocumentThreadableLoader> protectedThis(*this);
     370
    369371    // Any credential should have been removed from the cross-site requests.
    370372    const URL& requestURL = request.url();
     
    388390
    389391        ASSERT(!m_resource);
     392        if (m_resource) {
     393            CachedResourceHandle<CachedRawResource> resource = std::exchange(m_resource, nullptr);
     394            resource->removeClient(*this);
     395        }
     396
    390397        // We create an URL here as the request will be moved in requestRawResource
    391398        URL requestUrl = newRequest.resourceRequest().url();
Note: See TracChangeset for help on using the changeset viewer.