Fix by Darin, reviewed by Adele.
authoradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 25 Aug 2007 00:09:44 +0000 (00:09 +0000)
committeradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 25 Aug 2007 00:09:44 +0000 (00:09 +0000)
        Fix for <rdar://problem/5433422> Upon quitting, WebKit loads the WebPlugin shared database and immediately closes it

        * Plugins/WebPluginDatabase.h: Added closeSharedDatabase, which won't create a new database if we're just trying to close it.
        * Plugins/WebPluginDatabase.m: (+[WebPluginDatabase closeSharedDatabase]): Added.
        * WebView/WebView.mm:
        (-[WebView _close]): Call closeSharedDatabase.
        (+[WebView _applicationWillTerminate]): Call closeSharedDatabase.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25222 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/ChangeLog
WebKit/Plugins/WebPluginDatabase.h
WebKit/Plugins/WebPluginDatabase.m
WebKit/WebView/WebView.mm

index e10e77f591ea1662941411768b978f630a9eefcc..48f98eda7b2936322247a627a42da123f610d1c1 100644 (file)
@@ -1,3 +1,15 @@
+2007-08-24  Adele Peterson  <adele@apple.com>
+
+        Fix by Darin, reviewed by Adele.
+
+        Fix for <rdar://problem/5433422> Upon quitting, WebKit loads the WebPlugin shared database and immediately closes it
+
+        * Plugins/WebPluginDatabase.h: Added closeSharedDatabase, which won't create a new database if we're just trying to close it.
+        * Plugins/WebPluginDatabase.m: (+[WebPluginDatabase closeSharedDatabase]): Added.
+        * WebView/WebView.mm:
+        (-[WebView _close]): Call closeSharedDatabase.
+        (+[WebView _applicationWillTerminate]): Call closeSharedDatabase.
+
 2007-08-24  Timothy Hatcher  <timothy@apple.com>
 
         Reviewed by John Sullivan.
index 4644b65570bde44bebaf977434898824e3cd3093..edc6a46ae5f9d6d90abb92a8b68945491f28958b 100644 (file)
@@ -38,6 +38,7 @@
 }
 
 + (WebPluginDatabase *)sharedDatabase;
++ (void)closeSharedDatabase; // avoids creating the database just to close it
 
 // Plug-ins are returned in this order: New plug-in (WBPL), Mach-O Netscape, CFM Netscape
 - (WebBasePluginPackage *)pluginForMIMEType:(NSString *)mimeType;
index 55f9391aa0ed328c0774eb14cf6c34499ac7a860..c92da4fa177b406cb273af02ecf7ba455f19cf74 100644 (file)
@@ -64,6 +64,11 @@ static WebPluginDatabase *sharedDatabase = nil;
     return sharedDatabase;
 }
 
++ (void)closeSharedDatabase 
+{
+    [sharedDatabase close];
+}
+
 - (WebBasePluginPackage *)pluginForKey:(NSString *)key withEnumeratorSelector:(SEL)enumeratorSelector
 {
     WebBasePluginPackage *plugin = nil;
index 2d35f6091a7088e6ced3579a4b82562fa8516ef9..7549f2ba2daaacf5024fb00d58e31c18ea347d59 100644 (file)
@@ -707,7 +707,7 @@ static bool debugWidget = true;
     
     // Keep the global plug-in database active until the app terminates to avoid having to reload plug-in bundles.
     if (!pluginDatabaseClientCount && applicationIsTerminating)
-        [[WebPluginDatabase sharedDatabase] close];
+        [WebPluginDatabase closeSharedDatabase];
 }
 
 + (NSString *)_MIMETypeForFile:(NSString *)path
@@ -1667,7 +1667,7 @@ NSMutableDictionary *countInvocations;
 {   
     applicationIsTerminating = YES;
     if (!pluginDatabaseClientCount)
-        [[WebPluginDatabase sharedDatabase] close];
+        [WebPluginDatabase closeSharedDatabase];
 }
 
 #ifdef REMOVE_SAFARI_DOM_TREE_DEBUG_ITEM