Changeset 61307 in webkit
- Timestamp:
- Jun 16, 2010, 10:38:10 PM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
plugins/qt/PluginPackageQt.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r61306 r61307 1 2010-06-16 Dawit Alemayehu <adawit@kde.org> 2 3 Reviewed by Simon Hausmann. 4 5 [Qt] QtWebKit crashes while initializing flash plugin 10.1.53.64. 6 https://bugs.webkit.org/show_bug.cgi?id=40567 7 8 Avoid preventable crashes by ensuring gtk_init() is called in the 9 flash viewer plugins before calling NP_Initialize. 10 11 * plugins/qt/PluginPackageQt.cpp: 12 (WebCore::PluginPackage::load): 13 1 14 2010-06-16 Tony Gentilcore <tonyg@chromium.org> 2 15 -
trunk/WebCore/plugins/qt/PluginPackageQt.cpp
r58603 r61307 35 35 36 36 namespace WebCore { 37 38 typedef void gtkInitFunc(int *argc, char ***argv); 37 39 38 40 bool PluginPackage::fetchInfo() … … 110 112 NP_InitializeFuncPtr NP_Initialize; 111 113 NPError npErr; 114 gtkInitFunc* gtkInit; 112 115 113 116 NP_Initialize = (NP_InitializeFuncPtr)m_module->resolve("NP_Initialize"); … … 126 129 // It does so in NP_Initialize with a null instance, therefore it is done this way: 127 130 m_browserFuncs.getvalue = staticPluginQuirkRequiresGtkToolKit_NPN_GetValue; 131 } 132 133 // WORKAROUND: Prevent gtk based plugin crashes such as BR# 40567 by 134 // explicitly forcing the initializing of Gtk, i.e. calling gtk_init, 135 // whenver the symbol is present in the plugin library loaded above. 136 // Note that this workaround is based on code from the NSPluginClass ctor 137 // in KDE's kdebase/apps/nsplugins/viewer/nsplugin.cpp file. 138 gtkInit = (gtkInitFunc*)m_module->resolve("gtk_init"); 139 if (gtkInit) { 140 // Prevent gtk_init() from replacing the X error handlers, since the Gtk 141 // handlers abort when they receive an X error, thus killing the viewer. 142 #ifdef Q_WS_X11 143 int (*old_error_handler)(Display*, XErrorEvent*) = XSetErrorHandler(0); 144 int (*old_io_error_handler)(Display*) = XSetIOErrorHandler(0); 145 #endif 146 gtkInit(0, 0); 147 #ifdef Q_WS_X11 148 XSetErrorHandler(old_error_handler); 149 XSetIOErrorHandler(old_io_error_handler); 150 #endif 128 151 } 129 152
Note:
See TracChangeset
for help on using the changeset viewer.