Bug 1683973 - make VrService::mShutdownRequested atomic. r=jrmuizel

Differential Revision: https://phabricator.services.mozilla.com/D104109
This commit is contained in:
Alexis Beingessner 2021-02-09 17:51:22 +00:00
Родитель efe40d9e8d
Коммит 1380021cac
1 изменённых файлов: 2 добавлений и 1 удалений

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

@ -9,6 +9,7 @@
#include "moz_external_vr.h"
#include "base/process.h" // for base::ProcessHandle
#include "mozilla/Atomics.h"
#include "mozilla/TimeStamp.h"
#include "mozilla/UniquePtr.h"
#include "nsCOMPtr.h"
@ -63,7 +64,7 @@ class VRService {
// Only ever accessed on the service thread.
UniquePtr<mozilla::BackgroundHangMonitor> mBackgroundHangMonitor;
bool mShutdownRequested;
Atomic<bool> mShutdownRequested;
// Note: mShmem doesn't support RefPtr; thus, do not share this private
// pointer so that its lifetime can still be controlled by VRService