Bug 1271182 - Remove MOZ_COUNT_[CD]TOR from nsTimerEvent, since it uses XPCOM reference counting macros. r=khuey
authorL. David Baron <dbaron@dbaron.org>
Wed, 25 May 2016 18:04:36 -0700
changeset 338053 abafa95db1b11babb82ee2b32cd8c0bac784711c
parent 338052 bd4cebf613e67bc4e04e94a5239879194819f4c0
child 338054 937ed1be7cf45524949ce1e03535d85f72b70be3
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey
bugs1271182
milestone49.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 1271182 - Remove MOZ_COUNT_[CD]TOR from nsTimerEvent, since it uses XPCOM reference counting macros. r=khuey I suspect this will fix the odd behavior we're seeing, although I haven't really thought through how very closely. MozReview-Commit-ID: qHgBRAc1PE
xpcom/threads/TimerThread.cpp
--- a/xpcom/threads/TimerThread.cpp
+++ b/xpcom/threads/TimerThread.cpp
@@ -148,18 +148,16 @@ public:
     mTimer = nullptr;
     return NS_OK;
   }
 
   nsTimerEvent()
     : mTimer()
     , mGeneration(0)
   {
-    MOZ_COUNT_CTOR(nsTimerEvent);
-
     // Note: We override operator new for this class, and the override is
     // fallible!
     sAllocatorUsers++;
   }
 
   TimeStamp mInitTime;
 
   static void Init();
@@ -189,18 +187,16 @@ public:
 
 private:
   nsTimerEvent(const nsTimerEvent&) = delete;
   nsTimerEvent& operator=(const nsTimerEvent&) = delete;
   nsTimerEvent& operator=(const nsTimerEvent&&) = delete;
 
   ~nsTimerEvent()
   {
-    MOZ_COUNT_DTOR(nsTimerEvent);
-
     MOZ_ASSERT(!sCanDeleteAllocator || sAllocatorUsers > 0,
                "This will result in us attempting to deallocate the nsTimerEvent allocator twice");
     sAllocatorUsers--;
   }
 
   RefPtr<nsTimerImpl> mTimer;
   int32_t      mGeneration;