--- a/webengine/osswebengine/WebCore/platform/MimeTypeRegistry.cpp Fri May 08 08:25:06 2009 +0300
+++ b/webengine/osswebengine/WebCore/platform/MimeTypeRegistry.cpp Fri Jul 03 15:54:40 2009 +0100
@@ -44,7 +44,28 @@
static WTF::HashSet<String>* supportedImageResourceMIMETypes;
static WTF::HashSet<String>* supportedImageMIMETypes;
static WTF::HashSet<String>* supportedNonImageMIMETypes;
-
+
+struct cleanupMimeTypes {
+ ~cleanupMimeTypes() {
+ if( supportedImageResourceMIMETypes ) {
+ supportedImageResourceMIMETypes->clear();
+ delete supportedImageResourceMIMETypes;
+ supportedImageResourceMIMETypes = 0;
+ }
+ if( supportedImageMIMETypes ) {
+ supportedImageMIMETypes->clear();
+ delete supportedImageMIMETypes;
+ supportedImageMIMETypes = 0;
+ }
+ if( supportedNonImageMIMETypes ) {
+ supportedNonImageMIMETypes->clear();
+ delete supportedNonImageMIMETypes;
+ supportedNonImageMIMETypes = 0;
+ }
+ }
+};
+struct cleanupMimeTypes cleanMimeTypes;
+
#if PLATFORM(CG)
extern String getMIMETypeForUTI(const String& uti);
#endif