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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 4 08:29:11 PST 2010


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





--- Comment #6 from Yong Li <yong.li.webkit at gmail.com>  2010-03-04 08:29:11 PST ---
(In reply to comment #5)
> I think that one difference is that if you don't cancel, the resource will
> still load into disk cache, making subsequent loads faster.
> 
> This sounds like a duplicate of bug 6656, and if you agree, please mark it as
> such, even though it has a patch attached already.

No. It's different from bug 6656.

If we dont' cancel, the result is undetermined, depending on the port.
"m_handle" is cleared just after setClient(0), and in some ports, this
ResourceHandle's ref count becomes to 0 and then the job is canceled anyway. In
some other ports, the ResourceHandle object is still referenced in a list. When
it receives any data or response next time and the client is not there any
more, it must check "client()" otherwise it crashes. Something like this:
if (!client()) {
 cancel();
 return;
}
must be added into many places.

We should add a macro if we intend to load the not needed resource to disk
cache. Also, this may be unwanted for mobile devices. The code is called most
from MainResourceLoader, and there's not too much chance we want to load main
resource from disk.

-- 
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