[GTK] Runtime critical warnings when closing a page containing windowed plugins
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Nov 2015 16:36:29 +0000 (16:36 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Nov 2015 16:36:29 +0000 (16:36 +0000)
commit32e22368fd328a5096e67a572dda6e75eabe05ca
tree99c963a09df15254328c9193d37c170bce75249b
parent8c48bea51f955072add7b638081fc04e65f42148
[GTK] Runtime critical warnings when closing a page containing windowed plugins
https://bugs.webkit.org/show_bug.cgi?id=151132

Reviewed by Martin Robinson.

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.

* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
(WebKit::NetscapePlugin::platformPostInitializeWindowed):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192311 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp