[patch] fix for bug 68181

Waldo Bastian bastian at kde.org
Sat Dec 27 22:07:40 GMT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sat December 27 2003 20:29, Luís Pedro Coelho wrote:
> Hi,
>
> Check http://bugs.kde.org/show_bug.cgi?id=68181 for the whole story. I will
> copy the relevant test-case:
>
>  file1 : <img src="style.css" /> for preloading
>  file2 : <link res="stylesheet" href="style.css" />
>
>  CRASH: style.css is loaded as image !!!
>
> Here is the patch. It fixes the crash for me. Instead of (pseudo-code, of
> course):
>
> assert( cached_object->type() == Expected ) ;
>
> it does
>
> if (cached_object->type() != Expected ) {
> 	removeFromCache(cached_object) ;
> 	refetch ( ) ;
> }
>
> Ok to commit?

I feel a bit uncomfortable with just throwing entries out of the cache. 
Wouldn't it be better to keep the various types in a different cache-space? 
(E.g. by prefixing the key used as index into the cache with a 
type-indicator)

Cheers,
Waldo
- -- 
bastian at kde.org -=|[ KDE: K Desktop for the Enterprise ]|=- bastian at suse.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE/7gKsN4pvrENfboIRAgBoAKChceYXInsLtWlazZxgB9BXO+PC1QCfZTK0
oKTHbMKnStImfBS5QS6V+0I=
=b9sP
-----END PGP SIGNATURE-----




More information about the kfm-devel mailing list