bug 1406831 simplify AssertOnGraphThreadOrNotRunning() r?pehrsons draft
authorKarl Tomlinson <karlt+@karlt.net>
Thu, 28 Sep 2017 12:10:59 +1300
changeset 676610 795e9cdee643cfea3ff8ab19a462c72d9b732672
parent 676552 5eba13f5b3a6ad80decdd8c7b30bff5fa477844f
child 676611 0ebde4ac3da80fea901f379605200c05c31a7ab0
push id83545
push userktomlinson@mozilla.com
push dateMon, 09 Oct 2017 04:51:14 +0000
reviewerspehrsons
bugs1406831
milestone58.0a1
bug 1406831 simplify AssertOnGraphThreadOrNotRunning() r?pehrsons mLifecycleState is always > LIFECYCLE_RUNNING when mDetectedNotRunning MozReview-Commit-ID: Ds6ybTv4miA
dom/media/MediaStreamGraph.cpp
--- a/dom/media/MediaStreamGraph.cpp
+++ b/dom/media/MediaStreamGraph.cpp
@@ -1121,17 +1121,16 @@ MediaStreamGraph::AssertOnGraphThreadOrN
   // either we're on the right thread (and calling CurrentDriver() is safe),
   // or we're going to assert anyways, so don't cross-check CurrentDriver
 #ifdef DEBUG
   MediaStreamGraphImpl const * graph =
     static_cast<MediaStreamGraphImpl const *>(this);
   // if all the safety checks fail, assert we own the monitor
   if (!graph->mDriver->OnThread()) {
     if (!(graph->mDetectedNotRunning &&
-          graph->mLifecycleState > MediaStreamGraphImpl::LIFECYCLE_RUNNING &&
           NS_IsMainThread())) {
       graph->mMonitor.AssertCurrentThreadOwns();
     }
   }
 #endif
 }
 
 bool