Bug 63248 - [GTK] Install a custom X error handler in plugin process
Summary: [GTK] Install a custom X error handler in plugin process
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on: 60546
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-23 05:22 PDT by Carlos Garcia Campos
Modified: 2011-07-15 03:40 PDT (History)
0 users

See Also:


Attachments
Patch (2.67 KB, patch)
2011-06-23 05:28 PDT, Carlos Garcia Campos
mrobinson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2011-06-23 05:22:45 PDT
Some plugins, specially flash, can cause X errors that when handled by the default X error handler (or the GDK one) abort the process. See also bug #53016.
Comment 1 Carlos Garcia Campos 2011-06-23 05:28:04 PDT
Created attachment 98336 [details]
Patch

Fixes a crash in plugin process when loading http://www.f1.com
Comment 2 Martin Robinson 2011-06-23 07:58:06 PDT
Comment on attachment 98336 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=98336&action=review

> Source/WebKit2/PluginProcess/gtk/PluginProcessMainGtk.cpp:41
> +    gchar errorMessage[64];
> +    XGetErrorText(xdisplay, error->error_code, errorMessage, 63);

Is 64 enough here?
Comment 3 Carlos Garcia Campos 2011-06-23 08:07:30 PDT
(In reply to comment #2)
> (From update of attachment 98336 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=98336&action=review
> 
> > Source/WebKit2/PluginProcess/gtk/PluginProcessMainGtk.cpp:41
> > +    gchar errorMessage[64];
> > +    XGetErrorText(xdisplay, error->error_code, errorMessage, 63);
> 
> Is 64 enough here?

it's based on GDK code, see:

http://git.gnome.org/browse/gtk+/tree/gdk/x11/gdkdisplay-x11.c#n2351

so I guess it's enough, we could use something like 1024 to make sure.
Comment 4 Carlos Garcia Campos 2011-07-15 03:40:54 PDT
Committed r91062: <http://trac.webkit.org/changeset/91062>