Bug 1247189 - part5 : use IsCurrentThreadIn() as a main criteria to determine whether we're on the task queue or not. r=jya

The use of the TrackBuffersManager once detached is explictly forbidden, as such
OnTaskQueue() can only be used before the DetachTask ran: we now strongly assert
as such.

MozReview-Commit-ID: ycOI4QRElb

--HG--
extra : rebase_source : 44ea3d0eb292e5c285d0aa4e10eefa41f20beed7
This commit is contained in:
Alastor Wu 2017-10-11 16:12:13 +08:00
Родитель f519e79462
Коммит 8ef6776c31
1 изменённых файлов: 2 добавлений и 1 удалений

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

@ -461,7 +461,8 @@ private:
}
bool OnTaskQueue() const
{
return !GetTaskQueue() || GetTaskQueue()->IsCurrentThreadIn();
MOZ_RELEASE_ASSERT(GetTaskQueue());
return GetTaskQueue()->IsCurrentThreadIn();
}
RefPtr<AutoTaskQueue> mTaskQueue;