[webkit-changes] [33940] trunk/WebCore
Geoffrey Garen
ggaren at apple.com
Tue May 20 14:15:49 PDT 2008
> userSheet->setInCache(true);
> // Don't load incrementally, skip load checks, don't send
> resource load callbacks.
> userSheet->load(docLoader, false, true, false);
> - if (!disabled())
> + if (!disabled()) {
> m_resources.set(url, userSheet);
> + // This will move the resource to the front of its LRU list
> and increase its access count.
> + resourceAccessed(userSheet);
> + }
> else
> userSheet->setInCache(false);
>
> @@ -420,6 +423,7 @@
> // Make sure we aren't in some list already.
> ASSERT(!resource->m_nextInAllResourcesList && !resource-
> >m_prevInAllResourcesList);
> ASSERT(resource->inCache());
> + ASSERT(resource->accessCount() > 0);
>
> LRUList* list = lruListFor(resource);
>
Guys, I don't think this fix is complete: it will prevent user style
sheets from corrupting the cache, but all other kinds of resources --
scripts, regular style sheets, images, etc. -- will still be able to
corrupt the cache.
Alice, did something go wrong with the other two potential fixes we
discussed?
Geoff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.webkit.org/pipermail/webkit-changes/attachments/20080520/2dd102e8/attachment.htm
More information about the webkit-changes
mailing list