Bug 1415556 - P8. Assert on proper access of mStreams member. r=padenot.

mStreams should only ever be accessed on the MSG thread. However, under some shutdown circumstances, it can be accessed on the main thread while the MSG thread is still alive.

This will be corrected in bug 1408276.

MozReview-Commit-ID: 6xWzxxV1Dv3

--HG--
extra : rebase_source : bce92961609da6ea8609ec8ada5a8a30263a84c9
This commit is contained in:
Jean-Yves Avenard 2017-11-10 18:56:29 +01:00
Родитель a4416cf9f6
Коммит 9f54c61d6e
1 изменённых файлов: 3 добавлений и 0 удалений

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

@ -396,6 +396,9 @@ public:
*/
bool IsEmpty() const
{
MOZ_ASSERT(OnGraphThreadOrNotRunning() ||
(NS_IsMainThread() &&
LifecycleStateRef() >= LIFECYCLE_WAITING_FOR_MAIN_THREAD_CLEANUP));
return mStreams.IsEmpty() && mSuspendedStreams.IsEmpty() && mPortCount == 0;
}