[Webkit-unassigned] [Bug 35689] ResourceLoader should call cancel() on ResourceHandle after clearing its client

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 10 10:40:01 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=35689





--- Comment #15 from Yong Li <yong.li.webkit at gmail.com>  2010-03-10 10:40:01 PST ---
(In reply to comment #14)
> I have two specific concerns:
> - how does this affect the behavior described in bug 6656;
> - what will happen to loads in subframes when those are re-attached to another
> parent.
> 

98  if (m_handle->client() == this) {
9999 m_handle->setClient(0);
 100 m_handle->cancel();
 101 }
100102 m_handle = 0; 

There's a check for current client. If the resource is taken over by others
(like a download manager), its client is supposed to be changed to that. If the
client is null, the data will be lost anyway.

I just did a search, find that ResourceLoader::releaseResources() is only
called in these places:

1) NetscapePlugInStreamLoader::releaseResources()
2) MainResourceLoader::receivedError()
3) ResourceLoader::didFinishLoading()
4) ResourceLoader::didFail()
5) ResourceLoader::didCancel()

For 1), I cannot find where it's called.
For 3), 4), 5), no need to cancel the job because it's already done or
cancelled

For 2), it happens only in 2 cases:
a) MainResourceLoader::didFail(const ResourceError&
b) when Policy is changed to PolicyDownload

For b), the resource handle has been transferred to the downloader. My patch
will give a trouble if the downloader is still using the ResourceHandle without
changing its client. But is it possible?

For a), this can be called indirectly from ResourceHandler but can also be
called by other webkit modules. This is where my patch can help.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list