summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/qt/qt-webkit-4.6.3-flash-plugin-segfault.patch
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2010-09-08 07:33:44 (GMT)
committerJames Meyer <james.meyer@operamail.com>2010-09-08 07:33:44 (GMT)
commit525753e4a1a139e088d8ac120b19fbab6c0aaaa6 (patch)
tree35cef28abb613da4f58e83f6abbe4bd4cfa244bf /abs/core-testing/qt/qt-webkit-4.6.3-flash-plugin-segfault.patch
parent592e3cad43ef12c53f523145d0fd981b54f2a049 (diff)
parentb172f79fadb565ecfbcec9508f9377d8618a4f4c (diff)
downloadlinhes_pkgbuild-525753e4a1a139e088d8ac120b19fbab6c0aaaa6.zip
linhes_pkgbuild-525753e4a1a139e088d8ac120b19fbab6c0aaaa6.tar.gz
linhes_pkgbuild-525753e4a1a139e088d8ac120b19fbab6c0aaaa6.tar.bz2
Merge branch 'HEAD' of ssh://jams@knoppmyth.net/mount/repository/LinHES-PKGBUILD
Diffstat (limited to 'abs/core-testing/qt/qt-webkit-4.6.3-flash-plugin-segfault.patch')
-rw-r--r--abs/core-testing/qt/qt-webkit-4.6.3-flash-plugin-segfault.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/abs/core-testing/qt/qt-webkit-4.6.3-flash-plugin-segfault.patch b/abs/core-testing/qt/qt-webkit-4.6.3-flash-plugin-segfault.patch
new file mode 100644
index 0000000..6fc87ca
--- /dev/null
+++ b/abs/core-testing/qt/qt-webkit-4.6.3-flash-plugin-segfault.patch
@@ -0,0 +1,43 @@
+This patch fixes WebKit Bug 40567: [Qt] QtWebKit crashes while initializing
+flash plugin 10.1.53.64...
+https://bugs.webkit.org/show_bug.cgi?id=40567
+
+--- src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp
++++ src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp
+@@ -35,4 +35,6 @@
+
+ namespace WebCore {
++
++typedef void gtkInitFunc(int *argc, char ***argv);
+
+ bool PluginPackage::fetchInfo()
+@@ -110,4 +112,5 @@
+ NP_InitializeFuncPtr NP_Initialize;
+ NPError npErr;
++ gtkInitFunc* gtkInit;
+
+ NP_Initialize = (NP_InitializeFuncPtr)m_module->resolve("NP_Initialize");
+@@ -126,4 +129,24 @@
+ // It does so in NP_Initialize with a null instance, therefore it is done this way:
+ m_browserFuncs.getvalue = staticPluginQuirkRequiresGtkToolKit_NPN_GetValue;
++ }
++
++ // WORKAROUND: Prevent gtk based plugin crashes such as BR# 40567 by
++ // explicitly forcing the initializing of Gtk, i.e. calling gtk_init,
++ // whenver the symbol is present in the plugin library loaded above.
++ // Note that this workaround is based on code from the NSPluginClass ctor
++ // in KDE's kdebase/apps/nsplugins/viewer/nsplugin.cpp file.
++ gtkInit = (gtkInitFunc*)m_module->resolve("gtk_init");
++ if (gtkInit) {
++ // Prevent gtk_init() from replacing the X error handlers, since the Gtk
++ // handlers abort when they receive an X error, thus killing the viewer.
++#ifdef Q_WS_X11
++ int (*old_error_handler)(Display*, XErrorEvent*) = XSetErrorHandler(0);
++ int (*old_io_error_handler)(Display*) = XSetIOErrorHandler(0);
++#endif
++ gtkInit(0, 0);
++#ifdef Q_WS_X11
++ XSetErrorHandler(old_error_handler);
++ XSetIOErrorHandler(old_io_error_handler);
++#endif
+ }