RESOLVED FIXED 22349
Loader::Host::didReceiveResponse doesn't clear the client for 304 redirects
https://bugs.webkit.org/show_bug.cgi?id=22349
Summary Loader::Host::didReceiveResponse doesn't clear the client for 304 redirects
Brett Wilson (Google)
Reported 2008-11-18 18:07:12 PST
When Loader::Host::didReceiveResponse sees a 304 redirect, it magically removes the load from the list of pending loads, since the load is effectively complete (the cached version is good enough). This means the Host doesn't have a reference to the load that was a 304, but that load is still active. Under CFNet, didFinishLoading is called immediately after the didReceiveResponse without going back to the message loop. At this time, the Host object (which is the client of the subresource load) is still active and it works OK. Other platforms' network stack (and this might not even be guaranteed by CFNet) have different timing. On Chromium, our network stack sends the finished loading after you go back to the message loop. This gives a chance for the Host cleaner-uppper to run, which happens on a timer. This can lead to the Host getting deleted before the finished callback is run. The Host should just clear out the callback when it gets a 304 so there isn't this inconsistent state.
Attachments
Patch (1.27 KB, patch)
2008-11-19 08:22 PST, Brett Wilson (Google)
koivisto: review+
Brett Wilson (Google)
Comment 1 2008-11-19 08:22:24 PST
Created attachment 25268 [details] Patch Patch as we discussed on IRC.
Antti Koivisto
Comment 2 2008-11-19 09:54:53 PST
r=me
Brett Wilson (Google)
Comment 3 2008-11-19 12:46:14 PST
Fixed in r38601
Note You need to log in before you can comment on or make changes to this bug.