Bug 1300655 - part 2 - WorkerProxyToMainThreadRunnable::PostDispatchOnMainThread::ReleaseRunnable should implement Cancel() correctly, r=me

This commit is contained in:
Andrea Marchesini 2016-09-06 04:48:11 +02:00
Родитель 99a0e00f76
Коммит 4dedbcc6f2
1 изменённых файлов: 7 добавлений и 3 удалений

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

@ -730,10 +730,14 @@ WorkerProxyToMainThreadRunnable::PostDispatchOnMainThread()
MOZ_ASSERT(aWorkerPrivate);
aWorkerPrivate->AssertIsOnWorkerThread();
mRunnable->RunBackOnWorkerThread();
if (mRunnable) {
mRunnable->RunBackOnWorkerThread();
// Let's release the worker thread.
mRunnable->ReleaseWorker();
mRunnable = nullptr;
}
// Let's release the worker thread.
mRunnable->ReleaseWorker();
return true;
}