[Webkit-unassigned] [Bug 44806] Use purgeable memory to keep more dead resources in cache

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 30 16:27:40 PDT 2010


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





--- Comment #8 from Pratik Solanki <psolanki at apple.com>  2010-08-30 16:27:41 PST ---
(In reply to comment #7)

> Yes, I think we should get rid of the check.

Ok.

> That’s not a good reason.
> 
> We can use a "-" with an unsigned. The extra cast doesn’t do anything helpful; just makes the code harder to read. It’s not good to copy that mistake from the other code.

Ok. Changed.

> > It didn't look straightforward to move the check down to makePurgeable() so I'm leaving it where it is right now.
> 
> You don’t say anything concrete about why it didn’t look straightforward. It’s unfortunate to have checks in multiple places and wonder if we forgot one of the call sites.

Mainly because CachedResource::makePurgeable() gets called from Cache class as well and it needs to do its work when called from there. So I can't just have makePurgeable() look at the flag and decide what to do. I need to look at the caller as well. Which is why the check is at the call site. How can I design this better?

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