Bug 13084

Summary: ASSERTION FAILED: !m_clients.contains(c) in WebCore::CachedResource::ref(WebCore::CachedResourceClient*)
Product: WebKit Reporter: mitz
Component: WebCore Misc.Assignee: Dave Hyatt <hyatt>
Status: RESOLVED FIXED    
Severity: Normal CC: hyatt
Priority: P1 Keywords: HasReduction
Version: 523.x (Safari 3)   
Hardware: Mac   
OS: OS X 10.4   
URL: http://www.usatoday.com/news/washington/2007-03-13-archives_N.htm
Attachments:
Description Flags
Reduction (will assert)
none
Add a method to get all images used by a renderer
hyatt: review-
Convert to using a counted set in the cache.
andersca: review+
Tweak imageChanged in RenderImage and RenderListMarker andersca: review+

Description mitz 2007-03-15 11:49:46 PDT
I hit the above assertion every time I open the URL.
Comment 1 mitz 2007-03-16 06:34:22 PDT
Created attachment 13665 [details]
Reduction (will assert)
Comment 2 mitz 2007-03-16 08:25:02 PDT
Working on it...
Comment 3 mitz 2007-03-16 08:45:57 PDT
Created attachment 13667 [details]
Add a method to get all images used by a renderer

I didn't change RenderListMarker, which ref()s its image if it has one, because list markers cannot have box decorations. I could do that for consistency if you think that's better.
Comment 4 Dave Hyatt 2007-03-16 14:38:32 PDT
Comment on attachment 13667 [details]
Add a method to get all images used by a renderer

I disagree with the idea of minimizing refs and derefs, since refs even on the same image need to count as accesses of the image.

However it is true that the same resource should not be getting multiple notifications for the same image load.

I think a better way to solve this problem is to convert the cached resource client set to be a counted set.  That way multiple refs and derefs can still occur and we can still have meaningful asserts.
Comment 5 Dave Hyatt 2007-03-16 14:39:17 PDT
I will take care of this.
Comment 6 Dave Hyatt 2007-03-16 14:49:48 PDT
Created attachment 13670 [details]
Convert to using a counted set in the cache.
Comment 7 Anders Carlsson 2007-03-16 15:11:34 PDT
Comment on attachment 13670 [details]
Convert to using a counted set in the cache.

r=me
Comment 8 Dave Hyatt 2007-03-16 15:23:19 PDT
Created attachment 13673 [details]
Tweak imageChanged in RenderImage and RenderListMarker
Comment 9 Anders Carlsson 2007-03-16 15:24:49 PDT
Comment on attachment 13673 [details]
Tweak imageChanged in RenderImage and RenderListMarker

r=me
Comment 10 mitz 2007-03-17 06:49:15 PDT
Comment on attachment 13673 [details]
Tweak imageChanged in RenderImage and RenderListMarker

Landed <http://trac.webkit.org/projects/webkit/changeset/20242>
Comment 11 Dave Hyatt 2007-03-18 14:42:30 PDT
Fixed.