Skip to content
  • andersca@apple.com's avatar
    Add an async version of ResourceHandle::didReceiveResponse · ac87e20e
    andersca@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=114215
    
    Reviewed by Sam Weinig.
    
    Source/WebCore:
    
    In order to support converting NSURLConnections to NSURLDownloads when using the network process
    we need an async version of didReceiveResponse.
    
    * WebCore.exp.in:
    * platform/network/ResourceHandleClient.cpp:
    (WebCore::ResourceHandleClient::didReceiveResponseAsync):
    Just call continueDidReceiveResponse().
    
    * platform/network/mac/ResourceHandleMac.mm:
    (WebCore::ResourceHandle::continueWillSendRequest):
    Split up a single condition in two, making it easier to see which assertion fails.
    
    (WebCore::ResourceHandle::continueDidReceiveResponse):
    Call -[WebCoreResourceHandleAsOperationQueueDelegate continueDidReceiveResponse].
    
    (WebCore::ResourceHandle::continueShouldUseCredentialStorage):
    (WebCore::ResourceHandle::continueCanAuthenticateAgainstProtectionSpace):
    (WebCore::ResourceHandle::continueWillCacheResponse):
    Split up a single condition in two, making it easier to see which assertion fails.
    
    * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h:
    * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
    (-[WebCoreResourceHandleAsOperationQueueDelegate continueDidReceiveResponse]):
    Signal the semaphore.
    
    (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
    Call didReceiveResponseAsync on the main thread and wait on the semaphore.
    
    Source/WebKit2:
    
    * NetworkProcess/NetworkResourceLoader.cpp:
    (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
    Send the message and then call continueDidReceiveResponse.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147952 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    ac87e20e