зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1247189 - part3 : don't process any task after detached. r=jya
From [1], the task was executed after finished detach task. It would be caused by queuing two detach tasks in the task queue. If the previous detach task is still waiting in the task queue when we're calling the second detach(), then we might have two detach tasks in the queue. [1] https://treeherder.mozilla.org/logviewer.html#?job_id=134315866&repo=try&lineNumber=2540 MozReview-Commit-ID: HohgKqeZy0s --HG-- extra : rebase_source : 0d20f1b8648acaf2ed8e75b2631e905629c2abaf
This commit is contained in:
Родитель
5a164c7e06
Коммит
023e34cbe4
|
@ -172,6 +172,19 @@ TrackBuffersManager::QueueTask(SourceBufferTask* aTask)
|
|||
void
|
||||
TrackBuffersManager::ProcessTasks()
|
||||
{
|
||||
// A second Detach task was queued, prior the first one running, ignore it.
|
||||
if (!GetTaskQueue()) {
|
||||
RefPtr<SourceBufferTask> task = mQueue.Pop();
|
||||
if (!task) {
|
||||
return;
|
||||
}
|
||||
MOZ_RELEASE_ASSERT(task->GetType() == SourceBufferTask::Type::Detach,
|
||||
"only detach task could happen here!");
|
||||
MSE_DEBUG("Could not process the task '%s' after detached",
|
||||
task->GetTypeName());
|
||||
return;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(OnTaskQueue());
|
||||
typedef SourceBufferTask::Type Type;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче