Title: [122004] releases/WebKitGTK/webkit-1.8/Source/WebCore
- Revision
- 122004
- Author
- [email protected]
- Date
- 2012-07-06 13:03:06 -0700 (Fri, 06 Jul 2012)
Log Message
Merge 118949 - Check for GTK2/GTK3 symbol mismatch earlier
https://bugs.webkit.org/show_bug.cgi?id=87687
Patch by Daniel Drake <[email protected]> on 2012-05-30
Reviewed by Martin Robinson.
No new tests. Regressions in core behavior are covered by existing
plugin tests and the fix deals with particular aspects of the system
environment that are difficult to test.
Detect plugins that would mix GTK+ symbols earlier, so that the
WebKit can skip them and choose a more appropriate plugin module.
* plugins/gtk/PluginPackageGtk.cpp: Move this code from PluginViewGtk.
(WebCore::moduleMixesGtkSymbols):
(WebCore::PluginPackage::load):
* plugins/gtk/PluginViewGtk.cpp: Move this code to PluginPackageGtk.
(WebCore::PluginView::platformStart):
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-1.8/Source/WebCore/ChangeLog (122003 => 122004)
--- releases/WebKitGTK/webkit-1.8/Source/WebCore/ChangeLog 2012-07-06 20:02:57 UTC (rev 122003)
+++ releases/WebKitGTK/webkit-1.8/Source/WebCore/ChangeLog 2012-07-06 20:03:06 UTC (rev 122004)
@@ -1,3 +1,23 @@
+2012-05-30 Daniel Drake <[email protected]>
+
+ Check for GTK2/GTK3 symbol mismatch earlier
+ https://bugs.webkit.org/show_bug.cgi?id=87687
+
+ Reviewed by Martin Robinson.
+
+ No new tests. Regressions in core behavior are covered by existing
+ plugin tests and the fix deals with particular aspects of the system
+ environment that are difficult to test.
+
+ Detect plugins that would mix GTK+ symbols earlier, so that the
+ WebKit can skip them and choose a more appropriate plugin module.
+
+ * plugins/gtk/PluginPackageGtk.cpp: Move this code from PluginViewGtk.
+ (WebCore::moduleMixesGtkSymbols):
+ (WebCore::PluginPackage::load):
+ * plugins/gtk/PluginViewGtk.cpp: Move this code to PluginPackageGtk.
+ (WebCore::PluginView::platformStart):
+
2012-03-09 Abhishek Arya <[email protected]>
Crash when splitting an anonymous block in multi-column layout.
Modified: releases/WebKitGTK/webkit-1.8/Source/WebCore/plugins/gtk/PluginPackageGtk.cpp (122003 => 122004)
--- releases/WebKitGTK/webkit-1.8/Source/WebCore/plugins/gtk/PluginPackageGtk.cpp 2012-07-06 20:02:57 UTC (rev 122003)
+++ releases/WebKitGTK/webkit-1.8/Source/WebCore/plugins/gtk/PluginPackageGtk.cpp 2012-07-06 20:03:06 UTC (rev 122004)
@@ -119,6 +119,16 @@
}
#endif
+static bool moduleMixesGtkSymbols(GModule* module)
+{
+ void* symbol;
+#ifdef GTK_API_VERSION_2
+ return g_module_symbol(module, "gtk_application_get_type", &symbol);
+#else
+ return g_module_symbol(module, "gtk_object_get_type", &symbol);
+#endif
+}
+
bool PluginPackage::load()
{
if (m_isLoaded) {
@@ -150,6 +160,11 @@
return false;
}
+ if (moduleMixesGtkSymbols(m_module)) {
+ LOG(Plugins, "Ignoring module '%s' to avoid mixing GTK+ 2 and GTK+ 3 symbols.\n", m_path.utf8().data());
+ return false;
+ }
+
m_isLoaded = true;
#if defined(XP_UNIX)
Modified: releases/WebKitGTK/webkit-1.8/Source/WebCore/plugins/gtk/PluginViewGtk.cpp (122003 => 122004)
--- releases/WebKitGTK/webkit-1.8/Source/WebCore/plugins/gtk/PluginViewGtk.cpp 2012-07-06 20:02:57 UTC (rev 122003)
+++ releases/WebKitGTK/webkit-1.8/Source/WebCore/plugins/gtk/PluginViewGtk.cpp 2012-07-06 20:03:06 UTC (rev 122004)
@@ -834,26 +834,11 @@
view->updateWidgetAllocationAndClip();
}
-static bool moduleMixesGtkSymbols(GModule* module)
-{
- gpointer symbol;
-#ifdef GTK_API_VERSION_2
- return g_module_symbol(module, "gtk_application_get_type", &symbol);
-#else
- return g_module_symbol(module, "gtk_object_get_type", &symbol);
-#endif
-}
-
bool PluginView::platformStart()
{
ASSERT(m_isStarted);
ASSERT(m_status == PluginStatusLoadedSuccessfully);
- if (moduleMixesGtkSymbols(m_plugin->module())) {
- LOG(Plugins, "Module '%s' mixes GTK+ 2 and GTK+ 3 symbols, ignoring plugin.\n", m_plugin->path().utf8().data());
- return false;
- }
-
#if defined(XP_UNIX)
if (m_plugin->pluginFuncs()->getvalue) {
PluginView::setCurrentPluginView(this);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes