Bug 1036070 - Remove dangerous public destructor of VisualEventTracer r=froydnj
authorValentin Gosu <valentin.gosu@gmail.com>
Sun, 13 Jul 2014 21:16:55 +0300
changeset 215670 eb6fbf9aa30610503f84bb585dab3e026b053d8d
parent 215669 2b4c4160f2075e43b6738da7e46cb0a80fa21b4a
child 215671 58d9f861d2b40e1dc287106f02dc35bfb9276e66
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1036070
milestone33.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1036070 - Remove dangerous public destructor of VisualEventTracer r=froydnj
xpcom/base/VisualEventTracer.cpp
xpcom/base/VisualEventTracer.h
--- a/xpcom/base/VisualEventTracer.cpp
+++ b/xpcom/base/VisualEventTracer.cpp
@@ -532,28 +532,28 @@ Mark(uint32_t aType, void* aItem, const 
 #endif
 }
 
 
 #ifdef MOZ_VISUAL_EVENT_TRACER
 
 // The scriptable classes
 
-class VisualEventTracerLog : public nsIVisualEventTracerLog
+class VisualEventTracerLog MOZ_FINAL: public nsIVisualEventTracerLog
 {
   NS_DECL_ISUPPORTS
   NS_DECL_NSIVISUALEVENTTRACERLOG
 
   VisualEventTracerLog(RecordBatch* aBatch)
     : mBatch(aBatch)
     , mProfilerStart(*gProfilerStart)
   {
   }
-
-  virtual ~VisualEventTracerLog();
+private:
+  ~VisualEventTracerLog();
 
 protected:
   RecordBatch* mBatch;
   TimeStamp mProfilerStart;
 };
 
 NS_IMPL_ISUPPORTS(VisualEventTracerLog, nsIVisualEventTracerLog)
 
--- a/xpcom/base/VisualEventTracer.h
+++ b/xpcom/base/VisualEventTracer.h
@@ -209,20 +209,22 @@ private:
 
   MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
 };
 
 #ifdef MOZ_VISUAL_EVENT_TRACER
 
 // The scriptable class that drives the event tracer
 
-class VisualEventTracer : public nsIVisualEventTracer
+class VisualEventTracer MOZ_FINAL: public nsIVisualEventTracer
 {
   NS_DECL_ISUPPORTS
   NS_DECL_NSIVISUALEVENTTRACER
+private:
+  ~VisualEventTracer() {}
 };
 
 #define NS_VISUALEVENTTRACER_CID \
   { 0xb9e5e102, 0xc2f4, 0x497a,  \
     { 0xa6, 0xe4, 0x54, 0xde, 0xf3, 0x71, 0xf3, 0x9d } }
 #define NS_VISUALEVENTTRACER_CONTRACTID "@mozilla.org/base/visual-event-tracer;1"
 #define NS_VISUALEVENTTRACER_CLASSNAME "Visual Event Tracer"