Closed Bug 829525 Opened 10 years ago Closed 10 years ago

nsMainThreadPtrHolder needs a virtual destructor

Categories

(Core :: XPCOM, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla19
blocking-basecamp +
Tracking Status
firefox19 --- fixed
firefox20 --- fixed
firefox21 --- fixed
b2g18 --- fixed

People

(Reporter: mikeh, Assigned: mikeh)

References

Details

Attachments

(1 obsolete file)

clang on mozilla-b2g18 is complaining about it:

In file included from /builds/slave/m-b2g18-osx64-g/build/dom/camera/CameraControlImpl.cpp:8:
In file included from /builds/slave/m-b2g18-osx64-g/build/dom/camera/CameraControlImpl.h:9:
../../dist/include/nsProxyRelease.h:157:1: error: delete called on 'nsMainThreadPtrHolder<nsICameraErrorCallback>' that has virtual functions but non-virtual destructor [-Werror,-Wdelete-non-virtual-dtor]
NS_IMPL_THREADSAFE_RELEASE(nsMainThreadPtrHolder<T>)
^
../../dist/include/nsISupportsImpl.h:1397:5: note: expanded from macro 'NS_IMPL_THREADSAFE_RELEASE'
    delete (this);                                                            \
    ^
Assignee: nobody → mhabicher
Status: NEW → ASSIGNED
Attachment #700979 - Flags: review?(doug.turner)
blocking-basecamp: --- → ?
Attachment #700979 - Flags: review?(doug.turner) → review+
blocking-basecamp: ? → +
(In reply to Mike Habicher from comment #0)
> clang on mozilla-b2g18 is complaining about it:
> 
> In file included from
> /builds/slave/m-b2g18-osx64-g/build/dom/camera/CameraControlImpl.cpp:8:
> In file included from
> /builds/slave/m-b2g18-osx64-g/build/dom/camera/CameraControlImpl.h:9:
> ../../dist/include/nsProxyRelease.h:157:1: error: delete called on
> 'nsMainThreadPtrHolder<nsICameraErrorCallback>' that has virtual functions
> but non-virtual destructor [-Werror,-Wdelete-non-virtual-dtor]
Wasn't this fixed by bug 808146 (for the delete-non-vertual-dtor flag)?
(In reply to neil@parkwaycc.co.uk from comment #3)
>
> Wasn't this fixed by bug 808146 (for the delete-non-vertual-dtor flag)?

The b2g18 tree seems to be missing that.  Thanks for the pointer--I'll land it.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Comment on attachment 700979 [details] [diff] [review]
nsMainThreadPtrHolder needs a virtual destructor

Patch not required, marking obselete.
Attachment #700979 - Attachment is obsolete: true
Target Milestone: --- → mozilla21
Target Milestone: mozilla21 → mozilla19
You need to log in before you can comment on or make changes to this bug.