Bug 1655518 - Make two bool in ReverbConvolver atomic. r=karlt

The code structure is strange. This will be enough to make this safe without
fear of changing the behaviour.

Differential Revision: https://phabricator.services.mozilla.com/D85149
This commit is contained in:
Paul Adenot 2020-07-29 00:05:26 +00:00
Родитель 5f67c91ba8
Коммит 8494449709
1 изменённых файлов: 3 добавлений и 2 удалений

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

@ -38,6 +38,7 @@
# undef LOG
#endif
#include "base/thread.h"
#include <atomic>
namespace WebCore {
@ -83,8 +84,8 @@ class ReverbConvolver {
base::Thread m_backgroundThread;
mozilla::Monitor m_backgroundThreadMonitor;
bool m_useBackgroundThreads;
bool m_wantsToExit;
bool m_moreInputBuffered;
std::atomic<bool> m_wantsToExit;
std::atomic<bool> m_moreInputBuffered;
};
} // namespace WebCore