Bug 1530223: Promote assertion to MOZ_RELEASE_ASSERT r=asuth
authorYaron Tausky <ytausky@mozilla.com>
Tue, 05 Mar 2019 16:36:24 +0000
changeset 520296 19c4dc2037240742eaffc0fa8ae56f6e338a48d4
parent 520295 2237ab9382ec01be52172dbd51ca1f2a2e878a78
child 520297 b28187cd9146f568efa3d4a07a0715594388cda2
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersasuth
bugs1530223
milestone67.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 1530223: Promote assertion to MOZ_RELEASE_ASSERT r=asuth Instead of trying to figure out which pointer is nullptr, add a more powerful assertion. Since the nullptr already causes a crash, this won't cause any regression. Differential Revision: https://phabricator.services.mozilla.com/D22085
dom/workers/remoteworkers/RemoteWorkerChild.cpp
--- a/dom/workers/remoteworkers/RemoteWorkerChild.cpp
+++ b/dom/workers/remoteworkers/RemoteWorkerChild.cpp
@@ -436,17 +436,17 @@ void RemoteWorkerChild::CloseWorkerOnMai
   if (mWorkerState == ePending) {
     mWorkerState = ePendingTerminated;
     // Already released.
     return;
   }
 
   // The holder will be notified by this.
   if (mWorkerState == eRunning) {
-    MOZ_ASSERT(mWorkerPrivate);
+    MOZ_RELEASE_ASSERT(mWorkerPrivate);
     mWorkerPrivate->Cancel();
   }
 }
 
 void RemoteWorkerChild::FlushReportsOnMainThread(
     nsIConsoleReportCollector* aReporter) {
   MOZ_ASSERT(NS_IsMainThread());