Title: [154067] trunk/Source
Revision
154067
Author
[email protected]
Date
2013-08-14 13:21:05 -0700 (Wed, 14 Aug 2013)

Log Message

REGRESSION (r153877): Plugin scanning slows creation of WebViews
https://bugs.webkit.org/show_bug.cgi?id=119665
<rdar://problem/14716549>

Reviewed by Darin Adler.

Source/WebKit/mac:

* Plugins/WebPluginDatabase.h:
* Plugins/WebPluginDatabase.mm:
(+[WebPluginDatabase sharedDatabaseIfExists]): Added.

* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::refreshPlugins):
Only refresh the plugin database if it's already been loaded.

Source/WebKit2:

* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::refreshPlugins):
Don't repopulate the plugin cache in refreshPlugins, just invalidate it.
It will be repopulated the next time something tries to use it.

Modified Paths

Diff

Modified: trunk/Source/WebKit/mac/ChangeLog (154066 => 154067)


--- trunk/Source/WebKit/mac/ChangeLog	2013-08-14 20:16:49 UTC (rev 154066)
+++ trunk/Source/WebKit/mac/ChangeLog	2013-08-14 20:21:05 UTC (rev 154067)
@@ -1,3 +1,19 @@
+2013-08-14  Tim Horton  <[email protected]>
+
+        REGRESSION (r153877): Plugin scanning slows creation of WebViews
+        https://bugs.webkit.org/show_bug.cgi?id=119665
+        <rdar://problem/14716549>
+
+        Reviewed by Darin Adler.
+
+        * Plugins/WebPluginDatabase.h:
+        * Plugins/WebPluginDatabase.mm:
+        (+[WebPluginDatabase sharedDatabaseIfExists]): Added.
+
+        * WebCoreSupport/WebPlatformStrategies.mm:
+        (WebPlatformStrategies::refreshPlugins):
+        Only refresh the plugin database if it's already been loaded.
+
 2013-08-14  Jer Noble  <[email protected]>
 
         Revert r154019; causes >50 tests to fail on WebKit1 bots.

Modified: trunk/Source/WebKit/mac/Plugins/WebPluginDatabase.h (154066 => 154067)


--- trunk/Source/WebKit/mac/Plugins/WebPluginDatabase.h	2013-08-14 20:16:49 UTC (rev 154066)
+++ trunk/Source/WebKit/mac/Plugins/WebPluginDatabase.h	2013-08-14 20:21:05 UTC (rev 154067)
@@ -42,6 +42,7 @@
 }
 
 + (WebPluginDatabase *)sharedDatabase;
++ (WebPluginDatabase *)sharedDatabaseIfExists;
 + (void)closeSharedDatabase; // avoids creating the database just to close it
 
 // Plug-ins are returned in this order: New plug-in (WBPL), Mach-O Netscape

Modified: trunk/Source/WebKit/mac/Plugins/WebPluginDatabase.mm (154066 => 154067)


--- trunk/Source/WebKit/mac/Plugins/WebPluginDatabase.mm	2013-08-14 20:16:49 UTC (rev 154066)
+++ trunk/Source/WebKit/mac/Plugins/WebPluginDatabase.mm	2013-08-14 20:21:05 UTC (rev 154067)
@@ -72,6 +72,11 @@
     return sharedDatabase;
 }
 
++ (WebPluginDatabase *)sharedDatabaseIfExists
+{
+    return sharedDatabase;
+}
+
 + (void)closeSharedDatabase 
 {
     [sharedDatabase close];

Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm (154066 => 154067)


--- trunk/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm	2013-08-14 20:16:49 UTC (rev 154066)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm	2013-08-14 20:21:05 UTC (rev 154067)
@@ -123,7 +123,7 @@
 
 void WebPlatformStrategies::refreshPlugins()
 {
-    [[WebPluginDatabase sharedDatabase] refresh];
+    [[WebPluginDatabase sharedDatabaseIfExists] refresh];
 }
 
 void WebPlatformStrategies::getPluginInfo(const Page* page, Vector<PluginInfo>& plugins)

Modified: trunk/Source/WebKit2/ChangeLog (154066 => 154067)


--- trunk/Source/WebKit2/ChangeLog	2013-08-14 20:16:49 UTC (rev 154066)
+++ trunk/Source/WebKit2/ChangeLog	2013-08-14 20:21:05 UTC (rev 154067)
@@ -1,3 +1,16 @@
+2013-08-14  Tim Horton  <[email protected]>
+
+        REGRESSION (r153877): Plugin scanning slows creation of WebViews
+        https://bugs.webkit.org/show_bug.cgi?id=119665
+        <rdar://problem/14716549>
+
+        Reviewed by Darin Adler.
+
+        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
+        (WebKit::WebPlatformStrategies::refreshPlugins):
+        Don't repopulate the plugin cache in refreshPlugins, just invalidate it.
+        It will be repopulated the next time something tries to use it.
+
 2013-08-12  Dan Bernstein  <[email protected]>
 
         Fixed an off-by-(sizeof(char*) - 1) bug.

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp (154066 => 154067)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp	2013-08-14 20:16:49 UTC (rev 154066)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp	2013-08-14 20:21:05 UTC (rev 154067)
@@ -275,8 +275,6 @@
     m_cachedPlugins.clear();
     m_pluginCacheIsPopulated = false;
     m_shouldRefreshPlugins = true;
-
-    populatePluginCache();
 #endif // ENABLE(NETSCAPE_PLUGIN_API)
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to