FileDescriptorUtils.cpp:39:300: warning: deleting object of polymorphic class type ‘mozilla::ipc::CloseFileRunnable’ which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]

RESOLVED FIXED in mozilla22

Status

()

Core
IPC
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: dholbert, Assigned: dholbert)

Tracking

(Blocks: 1 bug)

Trunk
mozilla22
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

(Assignee)

Description

5 years ago
New build warning:
{
ipc/glue/FileDescriptorUtils.cpp: In member function ‘virtual nsrefcnt mozilla::ipc::CloseFileRunnable::Release()’:

ipc/glue/FileDescriptorUtils.cpp:39:300: warning: deleting object of polymorphic class type ‘mozilla::ipc::CloseFileRunnable’ which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]

}

This is in code added a few days ago, in bug 835698, and it can be fixed by an MOZ_FINAL annotation (which tells the compiler we don't have to worry about there being any subclasses, so we don't need a virtual destructor).  I'll push that with
blanket-r=ehsan, per bug 829975 comment 3.
(Assignee)

Updated

5 years ago
Flags: in-testsuite-
https://hg.mozilla.org/mozilla-central/rev/cff90661f8ca
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
You need to log in before you can comment on or make changes to this bug.