Closed Bug 1036070 Opened 10 years ago Closed 10 years ago

Remove dangerous public destructor of VisualEventTracer

Categories

(Core :: XPCOM, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: valentin, Assigned: valentin)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch event_tracer_destructor.patch (obsolete) (deleted) — Splinter Review
/home/icecold/mozilla-central/xpcom/base/VisualEventTracer.cpp:646:1: error: static_assert failed "Reference-counted class VisualEventTracer should not have a public destructor. Try to make this class's destructor non-public. If that is really not possible, you can whitelist this class by providing a HasDangerousPublicDestructor specialization for it." NS_IMPL_ISUPPORTS(VisualEventTracer, nsIVisualEventTracer)
Attachment #8452623 - Flags: review?(ehsan)
Attachment #8452623 - Flags: review?(ehsan) → review?(dougt)
Attachment #8452623 - Flags: review?(dougt) → review?(nfroyd)
Blocks: 1028132
Comment on attachment 8452623 [details] [diff] [review] event_tracer_destructor.patch Review of attachment 8452623 [details] [diff] [review]: ----------------------------------------------------------------- r=me with the changes below. ::: xpcom/base/VisualEventTracer.cpp @@ +551,1 @@ > virtual ~VisualEventTracerLog(); Please make this non-virtual and the class MOZ_FINAL while you are here. ::: xpcom/base/VisualEventTracer.h @@ +218,5 @@ > { > NS_DECL_ISUPPORTS > NS_DECL_NSIVISUALEVENTTRACER > +private: > + virtual ~VisualEventTracer() {} Please don't make this virtual and mark the class as MOZ_FINAL.
Attachment #8452623 - Flags: review?(nfroyd) → review+
Attachment #8452623 - Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: