Reviewed by Maciej, Darin.
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Jul 2007 16:54:22 +0000 (16:54 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Jul 2007 16:54:22 +0000 (16:54 +0000)
commit160adb4e284bfe99c627e23961c720eb54f27257
tree92c3f62f1d89eb76993fc20f34a46e12b5073349
parentdb165d7104be05f7b7960e5176953ac096bcca36
    Reviewed by Maciej, Darin.

        - http://bugs.webkit.org/show_bug.cgi?id=14030

        Add ResourceHandle::setClient to resolve some messiness with handle
        releasing. Clear the client when ResourceLoader is going to release
        the handle to prevent crashes in the case where somebody still holds a
        reference (this doesn't seem to currently happen in practice). Add
        NULL-checking for ResourceHandle implementations using the client.

        * loader/ResourceLoader.cpp:
        (WebCore::ResourceLoader::releaseResources):
        * platform/network/ResourceHandle.cpp:
        (WebCore::ResourceHandle::fireBlockedFailure):
        (WebCore::ResourceHandle::setClient):
        * platform/network/ResourceHandle.h:
        * platform/network/cf/ResourceHandleCFNet.cpp:
        (WebCore::willSendRequest):
        (WebCore::didReceiveResponse):
        (WebCore::didReceiveData):
        (WebCore::didFinishLoading):
        (WebCore::didFail):
        (WebCore::willCacheResponse):
        (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
        (WebCore::ResourceHandle::receivedCancellation):
        * platform/network/mac/ResourceHandleMac.mm:
        (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
        (WebCore::ResourceHandle::didCancelAuthenticationChallenge):
        (WebCore::ResourceHandle::receivedCancellation):
        (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]):
        (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
        (-[WebCoreResourceHandleAsDelegate connection:didReceiveData:lengthReceived:]):
        (-[WebCoreResourceHandleAsDelegate connection:willStopBufferingData:]):
        (-[WebCoreResourceHandleAsDelegate connectionDidFinishLoading:]):
        (-[WebCoreResourceHandleAsDelegate connection:didFailWithError:]):
        (-[WebCoreResourceHandleAsDelegate connection:willCacheResponse:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@24624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/loader/ResourceLoader.cpp
WebCore/platform/network/ResourceHandle.cpp
WebCore/platform/network/ResourceHandle.h
WebCore/platform/network/cf/ResourceHandleCFNet.cpp
WebCore/platform/network/mac/ResourceHandleMac.mm