Backed out 10 changesets (bug 1033358, bug 774388, bug 1028383) for causing frequent shutdown crashes on a CLOSED TREE.
Backed out changeset a54b05c9e4a1 (bug 1028383) Backed out changeset 37985f79e0c2 (bug 774388) Backed out changeset d07521729077 (bug 774388) Backed out changeset 9f14b17f358c (bug 774388) Backed out changeset 2d347d6aa9bc (bug 774388) Backed out changeset 99581dfb5ec4 (bug 774388) Backed out changeset 2532e22d6135 (bug 774388) Backed out changeset 719844108f1a (bug 774388) Backed out changeset 7829c78348a4 (bug 1033358) Backed out changeset c571df9a85de (bug 1033358)
This commit is contained in:
@@ -125,7 +125,34 @@ NS_GetMainThread(nsIThread** aResult)
|
||||
#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)
|
||||
#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()
|
||||
{
|
||||
bool result = false;
|
||||
nsThreadManager::get()->nsThreadManager::GetIsMainThread(&result);
|
||||
return bool(result);
|
||||
}
|
||||
#else
|
||||
bool
|
||||
NS_IsMainThread()
|
||||
{
|
||||
@@ -138,6 +165,7 @@ NS_IsMainThread()
|
||||
return bool(result);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
NS_METHOD
|
||||
NS_DispatchToCurrentThread(nsIRunnable* aEvent)
|
||||
@@ -328,9 +356,7 @@ nsThreadPoolNaming::SetThreadPoolName(const nsACString& aPoolName,
|
||||
NS_SetThreadName(aThread, name);
|
||||
} else {
|
||||
// Set on the current thread
|
||||
#ifndef XPCOM_GLUE_AVOID_NSPR
|
||||
PR_SetCurrentThreadName(name.BeginReading());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user