mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 923486, part 1 - Harmonize ordering of definitions of NS_IsMainThread(). r=ehsan
This commit is contained in:
parent
e07a2064e0
commit
4b43048358
@ -114,7 +114,24 @@ NS_GetMainThread(nsIThread **result)
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef MOZILLA_INTERNAL_API
|
||||
#if defined(MOZILLA_INTERNAL_API) && defined(XP_WIN)
|
||||
extern DWORD gTLSThreadIDIndex;
|
||||
bool
|
||||
NS_IsMainThread()
|
||||
{
|
||||
return TlsGetValue(gTLSThreadIDIndex) == (void*) mozilla::threads::Main;
|
||||
}
|
||||
#elif defined(MOZILLA_INTERNAL_API) && defined(NS_TLS)
|
||||
// NS_IsMainThread() is defined inline in MainThreadUtils.h
|
||||
#else
|
||||
#ifdef MOZILLA_INTERNAL_API
|
||||
bool NS_IsMainThread()
|
||||
{
|
||||
bool result = false;
|
||||
nsThreadManager::get()->nsThreadManager::GetIsMainThread(&result);
|
||||
return bool(result);
|
||||
}
|
||||
#else
|
||||
bool NS_IsMainThread()
|
||||
{
|
||||
bool result = false;
|
||||
@ -124,20 +141,7 @@ bool NS_IsMainThread()
|
||||
mgr->GetIsMainThread(&result);
|
||||
return bool(result);
|
||||
}
|
||||
#elif defined(XP_WIN)
|
||||
extern DWORD gTLSThreadIDIndex;
|
||||
bool
|
||||
NS_IsMainThread()
|
||||
{
|
||||
return TlsGetValue(gTLSThreadIDIndex) == (void*) mozilla::threads::Main;
|
||||
}
|
||||
#elif !defined(NS_TLS)
|
||||
bool NS_IsMainThread()
|
||||
{
|
||||
bool result = false;
|
||||
nsThreadManager::get()->nsThreadManager::GetIsMainThread(&result);
|
||||
return bool(result);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
NS_METHOD
|
||||
|
Loading…
Reference in New Issue
Block a user