bug 1406831 simplify AssertOnGraphThreadOrNotRunning() r?pehrsons
mLifecycleState is always > LIFECYCLE_RUNNING when mDetectedNotRunning
MozReview-Commit-ID: Ds6ybTv4miA
--- 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