nsGIOProtocolHandler.cpp:583:888: warning: deleting object of polymorphic class type ‘nsGIOInputStream’ which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]

RESOLVED FIXED in mozilla21

Status

()

defect
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: dholbert, Assigned: dholbert)

Tracking

(Blocks 1 bug)

Trunk
mozilla21
All
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Noticed some -Wdelete-non-virtual-dtor warnings in GIO/Gnome code today:
{
extensions/gio/nsGIOProtocolHandler.cpp:583:888: warning: deleting object of polymorphic class type ‘nsGIOInputStream’ which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]

extensions/gio/nsGIOProtocolHandler.cpp:900:2687: warning: deleting object of polymorphic class type ‘nsGIOProtocolHandler’ which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]

toolkit/system/gnome/nsGSettingsService.cpp:136:2708: warning: deleting object of polymorphic class type 'nsGSettingsCollection' which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]

toolkit/system/gnome/nsGSettingsService.cpp:322:2681: warning: deleting object of polymorphic class type 'nsGSettingsService' which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]
}

These can all be fixed by MOZ_FINAL annotations.  I'll push that with blanket-r=ehsan, per bug 829975 comment 3.
Blocks: 833547
https://hg.mozilla.org/mozilla-central/rev/a7ba9c337287
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.