mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-25 14:17:22 +00:00
Bug 895845 - Temporary ASan workaround in NS_IsMainThread. r=mccr8
--HG-- extra : rebase_source : 25d692141c3e609c59a3f1eaf81f317f08cb6e43
This commit is contained in:
parent
9f41d3f036
commit
8cf183b552
@ -14,7 +14,13 @@ bool NS_IsCycleCollectorThread();
|
||||
#elif defined(NS_TLS)
|
||||
// Defined in nsThreadManager.cpp.
|
||||
extern NS_TLS mozilla::threads::ID gTLSThreadID;
|
||||
inline bool NS_IsCycleCollectorThread()
|
||||
#ifdef MOZ_ASAN
|
||||
// Temporary workaround, see bug 895845
|
||||
MOZ_ASAN_BLACKLIST static
|
||||
#else
|
||||
inline
|
||||
#endif
|
||||
bool NS_IsCycleCollectorThread()
|
||||
{
|
||||
return gTLSThreadID == mozilla::threads::CycleCollector;
|
||||
}
|
||||
|
@ -99,7 +99,13 @@ bool NS_IsMainThread();
|
||||
// This is defined in nsThreadManager.cpp and initialized to `Main` for the
|
||||
// main thread by nsThreadManager::Init.
|
||||
extern NS_TLS mozilla::threads::ID gTLSThreadID;
|
||||
inline bool NS_IsMainThread()
|
||||
#ifdef MOZ_ASAN
|
||||
// Temporary workaround, see bug 895845
|
||||
MOZ_ASAN_BLACKLIST static
|
||||
#else
|
||||
inline
|
||||
#endif
|
||||
bool NS_IsMainThread()
|
||||
{
|
||||
return gTLSThreadID == mozilla::threads::Main;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user