WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
98002
WebPrintOperationGtk destructor should be virtual
https://bugs.webkit.org/show_bug.cgi?id=98002
Summary
WebPrintOperationGtk destructor should be virtual
Alberto Garcia
Reported
2012-10-01 01:51:11 PDT
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]
Attachments
Patch
(1.47 KB, patch)
2012-10-01 02:05 PDT
,
Alberto Garcia
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Alberto Garcia
Comment 1
2012-10-01 02:05:31 PDT
Created
attachment 166429
[details]
Patch
Carlos Garcia Campos
Comment 2
2012-10-01 04:01:31 PDT
Comment on
attachment 166429
[details]
Patch Thanks!
WebKit Review Bot
Comment 3
2012-10-01 04:12:01 PDT
Comment on
attachment 166429
[details]
Patch Clearing flags on attachment: 166429 Committed
r130028
: <
http://trac.webkit.org/changeset/130028
>
WebKit Review Bot
Comment 4
2012-10-01 04:12:04 PDT
All reviewed patches have been landed. Closing bug.
Carlos Garcia Campos
Comment 5
2012-10-02 08:35:52 PDT
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 .....
Alberto Garcia
Comment 6
2012-10-02 12:50:51 PDT
(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.
Alberto Garcia
Comment 7
2012-10-02 14:24:16 PDT
(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.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug