Ticket #10924: 0001-Get-client-right-after-check-for-valid-resourcehandl.patch

File 0001-Get-client-right-after-check-for-valid-resourcehandl.patch, 1.2 KB (added by markh, 4 years ago)

Fix for crash in WebCore::ResourceHandle::client

  • Source/WebCore/platform/network/haiku/BUrlProtocolHandler.cpp

    From b4fcb863051e8613c047645bcf936984e6e10231 Mon Sep 17 00:00:00 2001
    From: Mark Hellegers <mark@firedisk.net>
    Date: Sun, 28 Feb 2016 20:14:38 +0100
    Subject: [PATCH] Get client right after check for valid resourcehandle in
     HeadersReceived
    
    ---
     Source/WebCore/platform/network/haiku/BUrlProtocolHandler.cpp | 3 ++-
     1 file changed, 2 insertions(+), 1 deletion(-)
    
    diff --git a/Source/WebCore/platform/network/haiku/BUrlProtocolHandler.cpp b/Source/WebCore/platform/network/haiku/BUrlProtocolHandler.cpp
    index 16f9ed9..c231749 100644
    a b void BUrlProtocolHandler::HeadersReceived(BUrlRequest* /*caller*/)  
    453453    if (!m_resourceHandle)
    454454        return;
    455455
     456    ResourceHandleClient* client = m_resourceHandle->client();
     457
    456458    BHttpRequest* httpRequest = dynamic_cast<BHttpRequest*>(m_request);
    457459
    458460    WTF::String contentType = m_request->Result().ContentType();
    void BUrlProtocolHandler::HeadersReceived(BUrlRequest* /*caller*/)  
    500502            AuthenticationNeeded(httpRequest, response);
    501503    }
    502504
    503     ResourceHandleClient* client = m_resourceHandle->client();
    504505    if (!client)
    505506        return;
    506507