Changeset 91062 in webkit
- Timestamp:
- Jul 15, 2011 3:40:36 AM (13 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r91016 r91062 1 2011-07-15 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 Reviewed by Martin Robinson. 4 5 [GTK] Install a custom X error handler in plugin process 6 https://bugs.webkit.org/show_bug.cgi?id=63248 7 8 Some plugins, specially flash, can cause X errors that when 9 handled by the default X error handler (or the GDK one) abort the 10 process. Since we don't want to crash due to buggy plugins, we 11 install a custom error handler to show a warning when a X error 12 happens without aborting. 13 14 * PluginProcess/gtk/PluginProcessMainGtk.cpp: 15 (WebKit::webkitgtkXError): 16 (WebKit::PluginProcessMainGtk): 17 1 18 2011-07-14 Carlos Garcia Campos <cgarcia@igalia.com> 2 19 -
trunk/Source/WebKit2/PluginProcess/gtk/PluginProcessMainGtk.cpp
r91015 r91062 29 29 #include "PluginProcess.h" 30 30 #include <WebKit2/RunLoop.h> 31 #include <gdk/gdkx.h> 31 32 #include <gtk/gtk.h> 32 33 #include <runtime/InitializeThreading.h> … … 34 35 35 36 namespace WebKit { 37 38 static int webkitgtkXError(Display* xdisplay, XErrorEvent* error) 39 { 40 gchar errorMessage[64]; 41 XGetErrorText(xdisplay, error->error_code, errorMessage, 63); 42 g_warning("The program '%s' received an X Window System error.\n" 43 "This probably reflects a bug in a browser plugin.\n" 44 "The error was '%s'.\n" 45 " (Details: serial %ld error_code %d request_code %d minor_code %d)\n", 46 g_get_prgname(), errorMessage, 47 error->serial, error->error_code, 48 error->request_code, error->minor_code); 49 return 0; 50 } 36 51 37 52 WK_EXPORT int PluginProcessMainGtk(int argc, char* argv[]) … … 45 60 RunLoop::initializeMainRunLoop(); 46 61 62 // Plugins can produce X errors that are handled by the GDK X error handler, which 63 // exits the process. Since we don't want to crash due to plugin bugs, we install a 64 // custom error handler to show a warning when a X error happens without aborting. 65 XSetErrorHandler(webkitgtkXError); 66 47 67 int socket = atoi(argv[1]); 48 68 WebKit::PluginProcess::shared().initialize(socket, RunLoop::main());
Note: See TracChangeset
for help on using the changeset viewer.