GLib-CRITICAL **: g_io_channel_write_chars: assertion `channel->is_writeable' failed This is because GTK+ tries to write in the io channel that has already been closed.
Created attachment 167280 [details] Patch
Comment on attachment 167280 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=167280&action=review Looks good, but please see below before landing... > Source/WebKit2/ChangeLog:9 > + The problem is that GTK+ tries to write in the io channel that ash > + already been closed. Nit: IO channel that has > Source/WebKit2/WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:700 > + cairo_surface_finish(surface); Since this is a work-around for a GTK+ bug it's probably a good idea to put a comment here including a URL to the GTK+ bug in question.
(In reply to comment #2) > (From update of attachment 167280 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=167280&action=review > > Looks good, but please see below before landing... > > > Source/WebKit2/ChangeLog:9 > > + The problem is that GTK+ tries to write in the io channel that ash > > + already been closed. > > Nit: IO channel that has Sure. > > Source/WebKit2/WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:700 > > + cairo_surface_finish(surface); > > Since this is a work-around for a GTK+ bug it's probably a good idea to put a comment here including a URL to the GTK+ bug in question. It's not exactly a workaround, it's a good idea to do that in any case even if there weren't bugs in GTK+, we are already doing it in WebPrintOperationGtkUnix::endPrint() and it's reason why it didn't fail for other printing errors.
What I mean is that it would be useful to add links to the bugs there to remove the workaround when the bugs are fixed, but it's not the case, we want to finish the surface early even if the bugs are fixed.
Committed r130509: <http://trac.webkit.org/changeset/130509>