Closed
Bug 829975
Opened 12 years ago
Closed 12 years ago
nsGIOService.cpp:252:1: warning: deleting object of polymorphic class type ‘nsGIOService’ which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]
Categories
(Core :: Widget: Gtk, defect)
Core
Widget: Gtk
Tracking
()
RESOLVED
FIXED
mozilla21
People
(Reporter: dholbert, Assigned: dholbert)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
GCC 4.7.2 build warning:
{
toolkit/system/gnome/nsGIOService.cpp: In member function ‘virtual nsrefcnt nsGIOMimeApp::Release()’:
toolkit/system/gnome/nsGIOService.cpp:52:1: warning: deleting object of polymorphic class type ‘nsGIOMimeApp’ which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]
toolkit/system/gnome/nsGIOService.cpp: In member function ‘virtual nsrefcnt GIOUTF8StringEnumerator::Release()’:
toolkit/system/gnome/nsGIOService.cpp:117:1: warning: deleting object of polymorphic class type ‘GIOUTF8StringEnumerator’ which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]
toolkit/system/gnome/nsGIOService.cpp: In member function ‘virtual nsrefcnt nsGIOService::Release()’:
toolkit/system/gnome/nsGIOService.cpp:252:1: warning: deleting object of polymorphic class type ‘nsGIOService’ which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]
}
We just need to mark these classes as MOZ_FINAL, so the compiler knows there won't be any subclasses & they're fine without a virtual destructor.
Assignee | ||
Comment 1•12 years ago
|
||
Attachment #701481 -
Flags: review?(karlt)
Assignee | ||
Comment 2•12 years ago
|
||
Comment on attachment 701481 [details] [diff] [review]
fix
er, looks like karl's away for a few weeks.
This probably could just land without review, but I'll tag ehsan for a rubber-stamp for formality's sake, since I know he's familiar with this build warning. :)
Attachment #701481 -
Flags: review?(karlt) → review?(ehsan)
Comment 3•12 years ago
|
||
Comment on attachment 701481 [details] [diff] [review]
fix
Review of attachment 701481 [details] [diff] [review]:
-----------------------------------------------------------------
A while ago I talked Boris into giving me blanket r+ on these types of patches, and hereby I transitively grant that to you too for all similar patches in the future. :-)
Attachment #701481 -
Flags: review?(ehsan) → review+
Assignee | ||
Comment 4•12 years ago
|
||
Comment 5•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in
before you can comment on or make changes to this bug.
Description
•