NetworkProcess aborts in WebKit::NetworkLoad::didCompleteWithError at Source/WebKit2...
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Mar 2017 07:34:15 +0000 (07:34 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Mar 2017 07:34:15 +0000 (07:34 +0000)
commit6d3de828f975a9260bb17b274394dd647a5018a8
tree25c8c957776e3f48afdb9448d78c49e6a33a5e25
parent4a13b2677a4a336196ce65e586c87abf72212d87
NetworkProcess aborts in WebKit::NetworkLoad::didCompleteWithError at Source/WebKit2/NetworkProcess/NetworkLoad.cpp:423
https://bugs.webkit.org/show_bug.cgi?id=168963

Reviewed by Antti Koivisto.

This is trying to call SpeculativeLoad::didFailLoading() after SpeculativeLoad has already been
completed. SpeculativeLoad::didComplete() call its completion handler that removes the load from
m_pendingPreloads. When the completion handler returns the SpeculativeLoad is deleted. So, we should always
ensure that SpeculativeLoad is not used after didComplete() call. In SpeculativeLoad::willSendRedirectedRequest(),
the call to NetworkLoad::continueWillSendRequest() causes SpeculativeLoad::didFailLoading() to be called. We
don't really need to call continueWillSendRequest() though, since the network load is going to be deleted anyway
by didComplete(), and the willSendRequest completion handler does nothing when the request is null.

* NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
(WebKit::NetworkCache::SpeculativeLoad::willSendRedirectedRequest):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@213206 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp