Title: [128774] trunk/Source/WebKit2
Revision
128774
Author
[email protected]
Date
2012-09-17 10:53:38 -0700 (Mon, 17 Sep 2012)

Log Message

Don't load a blocked plug-in if a non-blocked version of the same plug-in exists
https://bugs.webkit.org/show_bug.cgi?id=96933
<rdar://problem/12206720>

Reviewed by Andreas Kling.

If a plug-in with the same bundle identifier already exists and it's blocked, remove it and replace it
with the other version.

* UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
(WebKit::PluginInfoStore::shouldUsePlugin):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (128773 => 128774)


--- trunk/Source/WebKit2/ChangeLog	2012-09-17 17:13:44 UTC (rev 128773)
+++ trunk/Source/WebKit2/ChangeLog	2012-09-17 17:53:38 UTC (rev 128774)
@@ -1,3 +1,17 @@
+2012-09-17  Anders Carlsson  <[email protected]>
+
+        Don't load a blocked plug-in if a non-blocked version of the same plug-in exists
+        https://bugs.webkit.org/show_bug.cgi?id=96933
+        <rdar://problem/12206720>
+
+        Reviewed by Andreas Kling.
+
+        If a plug-in with the same bundle identifier already exists and it's blocked, remove it and replace it
+        with the other version.
+
+        * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
+        (WebKit::PluginInfoStore::shouldUsePlugin):
+
 2012-09-17  Tor Arne Vestbø  <[email protected]>
 
         [Qt] Remove 'using namespace WebCore' from header file

Modified: trunk/Source/WebKit2/UIProcess/Plugins/mac/PluginInfoStoreMac.mm (128773 => 128774)


--- trunk/Source/WebKit2/UIProcess/Plugins/mac/PluginInfoStoreMac.mm	2012-09-17 17:13:44 UTC (rev 128773)
+++ trunk/Source/WebKit2/UIProcess/Plugins/mac/PluginInfoStoreMac.mm	2012-09-17 17:53:38 UTC (rev 128774)
@@ -115,8 +115,14 @@
         const PluginModuleInfo& loadedPlugin = alreadyLoadedPlugins[i];
 
         // If a plug-in with the same bundle identifier already exists, we don't want to load it.
-        if (loadedPlugin.bundleIdentifier == plugin.bundleIdentifier)
-            return false;
+        // However, if the already existing plug-in is blocked we want to replace it with the new plug-in.
+        if (loadedPlugin.bundleIdentifier == plugin.bundleIdentifier) {
+            if (!shouldBlockPlugin(loadedPlugin))
+                return false;
+
+            alreadyLoadedPlugins.remove(i);
+            break;
+        }
     }
 
     // Prefer the Oracle Java plug-in over the Apple java plug-in.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to