Bug 151132

Summary: [GTK] Runtime critical warnings when closing a page containing windowed plugins
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, gustavo, pnormand, zan
Priority: P2 Keywords: Gtk
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch mrobinson: review+

Description Carlos Garcia Campos 2015-11-11 03:12:38 PST
(WebKitPluginProcess:31915): Gtk-CRITICAL **: gtk_widget_destroy: assertion 'GTK_IS_WIDGET (widget)' failed

This is because our plugin widget that is a GtkPlug (derived from GtkWindow) can receive the delete-event signal before NetscapePlugin::platformDestroy is called. The delete-event signal, by default, destroys the window when the signal is not handled. So after the delete-event the GtkPlug is destroyed, but our pointer hasn't been reset. We can handle the delete-event using gtk_widget_hide_on_delete as callback, so that the plugin widget is hidden instead of destroyed.
Comment 1 Carlos Garcia Campos 2015-11-11 03:16:20 PST
Created attachment 265280 [details]
Patch
Comment 2 Carlos Garcia Campos 2015-11-11 08:36:34 PST
Committed r192311: <http://trac.webkit.org/changeset/192311>