зеркало из https://github.com/mozilla/gecko-dev.git
Bug 923486, part 2 - Define NS_IsMainThread out-of-line in ASAN builds. r=ehsan
This commit is contained in:
Родитель
ed66d6fc41
Коммит
45c94c7843
|
@ -29,14 +29,14 @@ bool NS_IsMainThread();
|
|||
extern NS_TLS mozilla::threads::ID gTLSThreadID;
|
||||
#ifdef MOZ_ASAN
|
||||
// Temporary workaround, see bug 895845
|
||||
MOZ_ASAN_BLACKLIST static
|
||||
MOZ_ASAN_BLACKLIST bool NS_IsMainThread();
|
||||
#else
|
||||
inline
|
||||
#endif
|
||||
bool NS_IsMainThread()
|
||||
{
|
||||
return gTLSThreadID == mozilla::threads::Main;
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
/**
|
||||
* Test to see if the current thread is the main thread.
|
||||
|
|
|
@ -122,7 +122,15 @@ NS_IsMainThread()
|
|||
return TlsGetValue(gTLSThreadIDIndex) == (void*) mozilla::threads::Main;
|
||||
}
|
||||
#elif defined(MOZILLA_INTERNAL_API) && defined(NS_TLS)
|
||||
#ifdef MOZ_ASAN
|
||||
// Temporary workaround, see bug 895845
|
||||
bool NS_IsMainThread()
|
||||
{
|
||||
return gTLSThreadID == mozilla::threads::Main;
|
||||
}
|
||||
#else
|
||||
// NS_IsMainThread() is defined inline in MainThreadUtils.h
|
||||
#endif
|
||||
#else
|
||||
#ifdef MOZILLA_INTERNAL_API
|
||||
bool NS_IsMainThread()
|
||||
|
|
Загрузка…
Ссылка в новой задаче