Bug 923486, part 2 - Define NS_IsMainThread out-of-line in ASAN builds. r=ehsan

This commit is contained in:
Andrew McCreight
2013-10-03 11:58:41 -07:00
parent af554389b2
commit b4bed988e6
2 changed files with 10 additions and 2 deletions

View File

@@ -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()