In file included from ../../Source/WebKit2/WebProcess/WebPage/gtk/WebPrintOperationGtk.h:32:0, from ../../Source/WebKit2/WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:27: ../../Source/WTF/wtf/RefCounted.h: In instantiation of ‘void WTF::RefCounted<T>::deref() [with T = WebKit::WebPrintOperationGtk]’: ../../Source/WebKit2/WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:158:31: required from here ../../Source/WTF/wtf/RefCounted.h:190:13: warning: deleting object of abstract class type ‘WebKit::WebPrintOperationGtk’ which has non-virtual destructor will cause undefined behaviour [-Wdelete-non-virtual-dtor]
Created attachment 166429 [details] Patch
Comment on attachment 166429 [details] Patch Thanks!
Comment on attachment 166429 [details] Patch Clearing flags on attachment: 166429 Committed r130028: <http://trac.webkit.org/changeset/130028>
All reviewed patches have been landed. Closing bug.
This patch broke unit tests, see /webkit2/WebKitPrintOperation/printing-settings: OK /webkit2/WebKitWebView/print: OK /webkit2/WebKitPrintOperation/print: OK /webkit2/WebKitPrintOperation/print-errors: (lt-WebKitWebProcess:19919): GLib-CRITICAL **: g_io_channel_write_chars: assertion `channel->is_writeable' failed (lt-WebKitWebProcess:19919): GLib-CRITICAL **: g_io_channel_write_chars: assertion `channel->is_writeable' failed (lt-WebKitWebProcess:19919): GLib-CRITICAL **: g_io_channel_write_chars: assertion `channel->is_writeable' failed (lt-WebKitWebProcess:19919): GLib-CRITICAL **: g_io_channel_write_chars: assertion `channel->is_writeable' failed .....
(In reply to comment #5) > This patch broke unit tests, see > > /webkit2/WebKitPrintOperation/printing-settings: OK > /webkit2/WebKitWebView/print: OK > /webkit2/WebKitPrintOperation/print: OK > /webkit2/WebKitPrintOperation/print-errors: > (lt-WebKitWebProcess:19919): GLib-CRITICAL **: g_io_channel_write_chars: assertion `channel->is_writeable' failed The difference now is that the destructor of the derived class is also called, and that means in particular that WebPrintOperationGtkUnix::m_printJob is now being destroyed, which is probably the source of that critical. I'll investigate what happens.
(In reply to comment #6) > > (lt-WebKitWebProcess:19919): GLib-CRITICAL **: g_io_channel_write_chars: assertion `channel->is_writeable' failed So this is triggered by the "print-errors" test, in particular the last one (the one expecting WEBKIT_PRINT_ERROR_INVALID_PAGE_RANGE). The test runs fine and it returns the expected value, but somehow produces that critical message when the program exists. My bet is that there's a bug somewhere in GtkPrintJob, which is the object that gets destroyed now that the destructor is virtual.