Bug 1194059 (Part 1) - Ensure that metadata decode progress is always delivered atomically. r=tn

This commit is contained in:
Seth Fowler 2015-08-14 00:37:11 -07:00
Родитель 2ad25b6368
Коммит e328e789ee
1 изменённых файлов: 4 добавлений и 1 удалений

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

@ -451,7 +451,10 @@ DecodePool::Decode(Decoder* aDecoder)
nsresult rv = aDecoder->Decode();
if (NS_SUCCEEDED(rv) && !aDecoder->GetDecodeDone()) {
if (aDecoder->HasProgress()) {
// If this isn't a metadata decode, notify for the progress we've made so
// far. It's important that metadata decode results are delivered
// atomically, so for those decodes we wait until NotifyDecodeComplete.
if (aDecoder->HasProgress() && !aDecoder->IsMetadataDecode()) {
NotifyProgress(aDecoder);
}
// The decoder will ensure that a new worker gets enqueued to continue