зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1824465 - Part 1: Introduce ReleaseAssertIsOnMainThread, r=xpcom-reviewers,emilio,kmag
This is like AssertIsOnMainThread, except with a release assert. Differential Revision: https://phabricator.services.mozilla.com/D173716
This commit is contained in:
Родитель
8443f43d87
Коммит
68102ede8d
|
@ -7,6 +7,7 @@
|
|||
#ifndef MainThreadUtils_h_
|
||||
#define MainThreadUtils_h_
|
||||
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "mozilla/ThreadSafety.h"
|
||||
#include "nscore.h"
|
||||
|
||||
|
@ -47,6 +48,11 @@ inline void AssertIsOnMainThread()
|
|||
MOZ_ASSERT_CAPABILITY(sMainThreadCapability) {}
|
||||
# endif
|
||||
|
||||
inline void ReleaseAssertIsOnMainThread()
|
||||
MOZ_ASSERT_CAPABILITY(sMainThreadCapability) {
|
||||
MOZ_RELEASE_ASSERT(NS_IsMainThread());
|
||||
}
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
#endif
|
||||
|
|
Загрузка…
Ссылка в новой задаче