Bug 895845 - Temporary ASan workaround in NS_IsMainThread. r=mccr8

--HG--
extra : rebase_source : 25d692141c3e609c59a3f1eaf81f317f08cb6e43
This commit is contained in:
Christian Holler 2013-07-27 01:37:19 +02:00
parent 9f41d3f036
commit 8cf183b552
2 changed files with 14 additions and 2 deletions

View File

@ -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;
}

View File

@ -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;
}