Bug 1762605 - RLBox thread-safety annotations r=bholley

Differential Revision: https://phabricator.services.mozilla.com/D142695
This commit is contained in:
Randell Jesup 2022-04-01 20:43:57 +00:00
parent 33fa70370a
commit ae3ccd0aa8

View File

@ -57,13 +57,13 @@ class RLBoxSandboxPool : public nsITimerCallback, public nsINamed {
virtual ~RLBoxSandboxPool() = default;
private:
void StartTimer();
void CancelTimer();
void StartTimer() REQUIRES(mMutex);
void CancelTimer() REQUIRES(mMutex);
nsTArray<UniquePtr<RLBoxSandboxDataBase>> mPool;
const size_t mDelaySeconds;
nsCOMPtr<nsITimer> mTimer;
mozilla::Mutex mMutex MOZ_UNANNOTATED;
nsTArray<UniquePtr<RLBoxSandboxDataBase>> mPool GUARDED_BY(mMutex);
const size_t mDelaySeconds GUARDED_BY(mMutex);
nsCOMPtr<nsITimer> mTimer GUARDED_BY(mMutex);
mozilla::Mutex mMutex;
};
// The RLBoxSandboxDataBase class serves as the subclass for all sandbox data