bug 1410043 remove over-zealous graph-thread assert in SetCurrentDriver() r?pehrsons
The reverts to accepting ownership of the monitor regardless of the thread, as
accepted prior to
https://hg.mozilla.org/mozilla-central/rev/e3f39de40209#l1.25
As indicated in the SetCurrentDriver() documentation, it can be called on the
main thread during Revive() before another graph thread is started.
At that point mLifecycleState = LIFECYCLE_RUNNING, and so it is not easy to
adjust AssertOnGraphThreadOrNotRunning() to accept this situation without
making it much more liberal.
An alternative would be to change the Revive() methods to set mDriver
directly, but that would differ from the usual driver-switching pattern.
MozReview-Commit-ID: 9O5qakPVML9
--- a/dom/media/MediaStreamGraphImpl.h
+++ b/dom/media/MediaStreamGraphImpl.h
@@ -471,17 +471,16 @@ public:
* should return and pass the control to the new driver shortly after.
* We can also switch from Revive() (on MainThread), in which case the
* monitor is held
*/
void SetCurrentDriver(GraphDriver* aDriver)
{
#ifdef DEBUG
mMonitor.AssertCurrentThreadOwns();
- AssertOnGraphThreadOrNotRunning();
#endif
mDriver = aDriver;
}
Monitor& GetMonitor()
{
return mMonitor;
}