зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
48222ef21a
Коммит
a83d028749
|
@ -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 {
|
||||
|
|
Загрузка…
Ссылка в новой задаче