Changeset 149251 in webkit


Ignore:
Timestamp:
Apr 27, 2013 8:22:55 PM (11 years ago)
Author:
ap@apple.com
Message:

<rdar://problem/13757687> Threads get stuck in NetworkProcess when canceling loads
https://bugs.webkit.org/show_bug.cgi?id=115319

Reviewed by Darin Adler.

WebResourceLoader was second-guessing NetworkProcess as to whether it needs a response
to DidReceiveResponseWithCertificateInfo, and it was guessing wrong if the load was
alrady canceled on WebProcess side.

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::didReceiveResponseAsync):

  • WebProcess/Network/WebResourceLoader.cpp:

(WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):

  • WebProcess/Network/WebResourceLoader.h:
  • WebProcess/Network/WebResourceLoader.messages.in:
Location:
trunk/Source/WebKit2
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r149246 r149251  
     12013-04-27  Alexey Proskuryakov  <ap@apple.com>
     2
     3        <rdar://problem/13757687> Threads get stuck in NetworkProcess when canceling loads
     4        https://bugs.webkit.org/show_bug.cgi?id=115319
     5
     6        Reviewed by Darin Adler.
     7
     8        WebResourceLoader was second-guessing NetworkProcess as to whether it needs a response
     9        to DidReceiveResponseWithCertificateInfo, and it was guessing wrong if the load was
     10        alrady canceled on WebProcess side.
     11
     12        * NetworkProcess/NetworkResourceLoader.cpp:
     13        (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
     14        * WebProcess/Network/WebResourceLoader.cpp:
     15        (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
     16        * WebProcess/Network/WebResourceLoader.h:
     17        * WebProcess/Network/WebResourceLoader.messages.in:
     18
    1192013-04-27  Alexey Proskuryakov  <ap@apple.com>
    220
  • trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp

    r149204 r149251  
    153153        formData->removeGeneratedFilesIfNeeded();
    154154
    155     sendAbortingOnFailure(Messages::WebResourceLoader::DidReceiveResponseWithCertificateInfo(response, PlatformCertificateInfo(response)));
     155    sendAbortingOnFailure(Messages::WebResourceLoader::DidReceiveResponseWithCertificateInfo(response, PlatformCertificateInfo(response), isLoadingMainResource()));
    156156
    157157    if (!isLoadingMainResource()) {
  • trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp

    r148995 r149251  
    100100}
    101101
    102 void WebResourceLoader::didReceiveResponseWithCertificateInfo(const ResourceResponse& response, const PlatformCertificateInfo& certificateInfo)
     102void WebResourceLoader::didReceiveResponseWithCertificateInfo(const ResourceResponse& response, const PlatformCertificateInfo& certificateInfo, bool needsContinueDidReceiveResponseMessage)
    103103{
    104104    LOG(Network, "(WebProcess) WebResourceLoader::didReceiveResponseWithCertificateInfo for '%s'. Status %d.", m_coreLoader->url().string().utf8().data(), response.httpStatusCode());
     
    110110    m_coreLoader->didReceiveResponse(responseCopy);
    111111
    112     if (!m_coreLoader)
    113         return;
    114 
    115     if (m_coreLoader == m_coreLoader->documentLoader()->mainResourceLoader())
     112    if (needsContinueDidReceiveResponseMessage)
    116113        send(Messages::NetworkResourceLoader::ContinueDidReceiveResponse());
    117114}
  • trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.h

    r147568 r149251  
    7777    void willSendRequest(const WebCore::ResourceRequest&, const WebCore::ResourceResponse& redirectResponse);
    7878    void didSendData(uint64_t bytesSent, uint64_t totalBytesToBeSent);
    79     void didReceiveResponseWithCertificateInfo(const WebCore::ResourceResponse&, const PlatformCertificateInfo&);
     79    void didReceiveResponseWithCertificateInfo(const WebCore::ResourceResponse&, const PlatformCertificateInfo&, bool needsContinueDidReceiveResponseMessage);
    8080    void didReceiveData(const CoreIPC::DataReference&, int64_t encodedDataLength);
    8181    void didFinishResourceLoad(double finishTime);
  • trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.messages.in

    r147568 r149251  
    2828    WillSendRequest(WebCore::ResourceRequest request, WebCore::ResourceResponse redirectResponse)
    2929    DidSendData(uint64_t bytesSent, uint64_t totalBytesToBeSent)
    30     DidReceiveResponseWithCertificateInfo(WebCore::ResourceResponse response, WebKit::PlatformCertificateInfo certificateInfo)
     30    DidReceiveResponseWithCertificateInfo(WebCore::ResourceResponse response, WebKit::PlatformCertificateInfo certificateInfo, bool needsContinueDidReceiveResponseMessage)
    3131    DidReceiveData(CoreIPC::DataReference data, int64_t encodedDataLength)
    3232    DidFinishResourceLoad(double finishTime)
Note: See TracChangeset for help on using the changeset viewer.