Bug 1306733: Don't crash on release builds if mTimer isn't set here. r=froydnj
authorByron Campen [:bwc] <docfaraday@gmail.com>
Fri, 30 Sep 2016 16:42:45 -0500
changeset 316403 067c15e2620f0f518d7ee70a06cdfd226f13b3f2
parent 316402 b4844ee1e542d33e2b857ad143c717526592a0b6
child 316404 baa5349a1621b63cbdfdcf3895003f347a815097
push id30770
push userkwierso@gmail.com
push dateWed, 05 Oct 2016 00:00:48 +0000
treeherdermozilla-central@3470e326025c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1306733
milestone52.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 1306733: Don't crash on release builds if mTimer isn't set here. r=froydnj MozReview-Commit-ID: eupSpSpJU3
xpcom/threads/TimerThread.cpp
--- a/xpcom/threads/TimerThread.cpp
+++ b/xpcom/threads/TimerThread.cpp
@@ -265,17 +265,20 @@ nsTimerEvent::DeleteAllocatorIfNeeded()
     delete sAllocator;
     sAllocator = nullptr;
   }
 }
 
 NS_IMETHODIMP
 nsTimerEvent::Run()
 {
-  MOZ_ASSERT(mTimer);
+  if (!mTimer) {
+    MOZ_ASSERT(false);
+    return NS_OK;
+  }
 
   if (mGeneration != mTimer->GetGeneration()) {
     return NS_OK;
   }
 
   if (MOZ_LOG_TEST(GetTimerLog(), LogLevel::Debug)) {
     TimeStamp now = TimeStamp::Now();
     MOZ_LOG(GetTimerLog(), LogLevel::Debug,