mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1256510: When shutting down MediaStreamGraphs, if the graph hasn't started, let it start and shut down r=padenot
MozReview-Commit-ID: 64WjTbaduvu
This commit is contained in:
parent
0c0862c4c2
commit
ef46e30953
@ -212,7 +212,8 @@ public:
|
||||
}
|
||||
} else {
|
||||
MonitorAutoLock mon(mDriver->mGraphImpl->GetMonitor());
|
||||
MOZ_ASSERT(mDriver->mGraphImpl->MessagesQueued(), "Don't start a graph without messages queued.");
|
||||
MOZ_ASSERT(mDriver->mGraphImpl->MessagesQueued() ||
|
||||
mDriver->mGraphImpl->mForceShutDown, "Don't start a graph without messages queued.");
|
||||
mDriver->mGraphImpl->SwapMessageQueues();
|
||||
}
|
||||
mDriver->RunThread();
|
||||
|
@ -1481,6 +1481,14 @@ MediaStreamGraphImpl::ForceShutDown(ShutdownTicket* aShutdownTicket)
|
||||
MonitorAutoLock lock(mMonitor);
|
||||
mForceShutDown = true;
|
||||
mForceShutdownTicket = aShutdownTicket;
|
||||
if (mLifecycleState == LIFECYCLE_THREAD_NOT_STARTED) {
|
||||
// We *could* have just sent this a message to start up, so don't
|
||||
// yank the rug out from under it. Tell it to startup and let it
|
||||
// shut down.
|
||||
RefPtr<GraphDriver> driver = CurrentDriver();
|
||||
MonitorAutoUnlock unlock(mMonitor);
|
||||
driver->Start();
|
||||
}
|
||||
EnsureNextIterationLocked();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user