diff options
author | Sune Vuorela <sune@vuorela.dk> | 2010-09-06 12:34:46 +0200 |
---|---|---|
committer | Sune Vuorela <sune@vuorela.dk> | 2010-09-06 12:34:46 +0200 |
commit | 7a35ead46af248ecb37573dcec90e8ea87dde80e (patch) | |
tree | da765ac284cf5af217ee251748b78a00f26c6d49 | |
parent | ad64ad4954faad41a5fba44b43849484cd5863be (diff) | |
download | qt4-x11-7a35ead46af248ecb37573dcec90e8ea87dde80e.tar.gz |
backported bugfix in qtwebkit; crash fix when loading gtk plugins that doesn't do gtk_init themselves
-rw-r--r-- | debian/changelog | 4 | ||||
-rw-r--r-- | debian/patches/0006_webkit_propriotary_flash_init_gtk_first.diff | 70 | ||||
-rw-r--r-- | debian/patches/series | 1 |
3 files changed, 75 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 62a9b81..b255144 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,10 @@ qt4-x11 (4:4.6.3-2) UNRELEASED; urgency=low [ Modestas Vainius ] * Fix debian/control Vcs fields to point to the new location. + [ Sune Vuorela ] + * Steal patch from upstream to make webkit not crash when loading adobe + flash plugin. This is related to a change in flashplugin. + -- Fathi Boudra <fabo@debian.org> Thu, 17 Jun 2010 09:03:32 +0300 qt4-x11 (4:4.6.3-1) unstable; urgency=low diff --git a/debian/patches/0006_webkit_propriotary_flash_init_gtk_first.diff b/debian/patches/0006_webkit_propriotary_flash_init_gtk_first.diff new file mode 100644 index 0000000..6d1cc03 --- /dev/null +++ b/debian/patches/0006_webkit_propriotary_flash_init_gtk_first.diff @@ -0,0 +1,70 @@ +init gtk when available when loading plugins.
+
+http://trac.webkit.org/changeset/61307
+
+
+--- a/src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp ++++ b/src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp +@@ -35,6 +35,8 @@ + + namespace WebCore { + ++typedef void gtkInitFunc(int *argc, char ***argv); ++ + bool PluginPackage::fetchInfo() + { + if (!load()) +@@ -109,6 +111,7 @@ bool PluginPackage::load() + + NP_InitializeFuncPtr NP_Initialize; + NPError npErr; ++ gtkInitFunc* gtkInit; + + NP_Initialize = (NP_InitializeFuncPtr)m_module->resolve("NP_Initialize"); + m_NPP_Shutdown = (NPP_ShutdownProcPtr)m_module->resolve("NP_Shutdown"); +@@ -127,6 +130,26 @@ bool PluginPackage::load() + 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 ++ } ++ + #if defined(XP_UNIX) + npErr = NP_Initialize(&m_browserFuncs, &m_pluginFuncs); + #else +--- a/src/3rdparty/webkit/WebCore/ChangeLog ++++ b/src/3rdparty/webkit/WebCore/ChangeLog +@@ -1,3 +1,16 @@ ++2010-06-16 Dawit Alemayehu <adawit@kde.org> ++ ++ Reviewed by Simon Hausmann. ++ ++ [Qt] QtWebKit crashes while initializing flash plugin 10.1.53.64. ++ https://bugs.webkit.org/show_bug.cgi?id=40567 ++ ++ Avoid preventable crashes by ensuring gtk_init() is called in the ++ flash viewer plugins before calling NP_Initialize. ++ ++ * plugins/qt/PluginPackageQt.cpp: ++ (WebCore::PluginPackage::load): ++ + 2010-05-04 Tucker Jay <jay.tucker@nokia.com> + + Reviewed by Holger Freyther. diff --git a/debian/patches/series b/debian/patches/series index 953b713..c803317 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,6 +1,7 @@ # upstream patches 0004_problem_displaying_half_width_character.diff 0005_fix_detection_of_headers_files.diff +0006_webkit_propriotary_flash_init_gtk_first.diff # qt-copy patches 0180-window-role.diff |