Bug 1577537 - Exit MediaStreamGraphImpl::CollectReports early when there are no streams. r=padenot

Differential Revision: https://phabricator.services.mozilla.com/D44369

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andreas Pehrson 2019-09-02 14:58:03 +00:00
Родитель 48222ef21a
Коммит a83d028749
1 изменённых файлов: 4 добавлений и 7 удалений

Просмотреть файл

@ -3361,13 +3361,10 @@ NS_IMETHODIMP
MediaStreamGraphImpl::CollectReports(nsIHandleReportCallback* aHandleReport,
nsISupports* aData, bool aAnonymize) {
MOZ_ASSERT(NS_IsMainThread());
{
MonitorAutoLock mon(mMonitor);
if (LifecycleStateRef() >= LIFECYCLE_WAITING_FOR_THREAD_SHUTDOWN) {
// Shutting down, nothing to report.
FinishCollectReports(aHandleReport, aData, nsTArray<AudioNodeSizes>());
return NS_OK;
}
if (mMainThreadStreamCount == 0) {
// No streams to report.
FinishCollectReports(aHandleReport, aData, nsTArray<AudioNodeSizes>());
return NS_OK;
}
class Message final : public ControlMessage {