Title: [204810] releases/WebKitGTK/webkit-2.12/Source/WebKit2
Revision
204810
Author
[email protected]
Date
2016-08-23 04:36:55 -0700 (Tue, 23 Aug 2016)

Log Message

Merge r201749 - [GTK] Hide GTK+ 2 plugins if GTK+ 2 plugin process was built but is not installed
https://bugs.webkit.org/show_bug.cgi?id=158419

Reviewed by Carlos Garcia Campos.

* UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
(WebKit::PluginInfoStore::getPluginInfo):
* UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
(WebKit::PluginProcessProxy::scanPlugin):

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.12/Source/WebKit2/ChangeLog (204809 => 204810)


--- releases/WebKitGTK/webkit-2.12/Source/WebKit2/ChangeLog	2016-08-23 11:36:28 UTC (rev 204809)
+++ releases/WebKitGTK/webkit-2.12/Source/WebKit2/ChangeLog	2016-08-23 11:36:55 UTC (rev 204810)
@@ -1,3 +1,17 @@
+2016-06-07  Michael Catanzaro  <[email protected]>
+
+        [GTK] Hide GTK+ 2 plugins if GTK+ 2 plugin process was built but is not installed
+        https://bugs.webkit.org/show_bug.cgi?id=158419
+
+        Reviewed by Carlos Garcia Campos.
+
+        Patch by Alberto Garcia <[email protected]>
+
+        * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
+        (WebKit::PluginInfoStore::getPluginInfo):
+        * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
+        (WebKit::PluginProcessProxy::scanPlugin):
+
 2016-05-25  Fujii Hironori  <[email protected]>
 
         [Unix] Potential buffer overrun of m_fileDescriptors in readBytesFromSocket of ConnectionUnix.cpp

Modified: releases/WebKitGTK/webkit-2.12/Source/WebKit2/UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp (204809 => 204810)


--- releases/WebKitGTK/webkit-2.12/Source/WebKit2/UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp	2016-08-23 11:36:28 UTC (rev 204809)
+++ releases/WebKitGTK/webkit-2.12/Source/WebKit2/UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp	2016-08-23 11:36:55 UTC (rev 204810)
@@ -33,6 +33,7 @@
 
 #include "NetscapePluginModule.h"
 #include "PluginSearchPath.h"
+#include "ProcessExecutablePath.h"
 #include <WebCore/FileSystem.h>
 
 #if PLATFORM(GTK)
@@ -69,8 +70,17 @@
 bool PluginInfoStore::getPluginInfo(const String& pluginPath, PluginModuleInfo& plugin)
 {
 #if PLATFORM(GTK)
-    if (PluginInfoCache::singleton().getPluginInfo(pluginPath, plugin))
+    if (PluginInfoCache::singleton().getPluginInfo(pluginPath, plugin)) {
+#if ENABLE(PLUGIN_PROCESS_GTK2)
+        if (plugin.requiresGtk2) {
+            String pluginProcessPath = executablePathOfPluginProcess();
+            pluginProcessPath.append('2');
+            if (!fileExists(pluginProcessPath))
+                return false;
+        }
+#endif
         return true;
+    }
 
     if (NetscapePluginModule::getPluginInfo(pluginPath, plugin)) {
         PluginInfoCache::singleton().updatePluginInfo(pluginPath, plugin);

Modified: releases/WebKitGTK/webkit-2.12/Source/WebKit2/UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp (204809 => 204810)


--- releases/WebKitGTK/webkit-2.12/Source/WebKit2/UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp	2016-08-23 11:36:28 UTC (rev 204809)
+++ releases/WebKitGTK/webkit-2.12/Source/WebKit2/UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp	2016-08-23 11:36:55 UTC (rev 204810)
@@ -83,12 +83,15 @@
 
 #if PLATFORM(GTK)
     bool requiresGtk2 = pluginRequiresGtk2(pluginPath);
-    if (requiresGtk2)
+    if (requiresGtk2) {
 #if ENABLE(PLUGIN_PROCESS_GTK2)
         pluginProcessPath.append('2');
+        if (!fileExists(pluginProcessPath))
+            return false;
 #else
         return false;
 #endif
+    }
 #endif
 
     CString binaryPath = fileSystemRepresentation(pluginProcessPath);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to