Bug 526586 - XULRunner crashes on startup on Windows r=bustage fix and at least agreement on the approach from dbaron
This commit is contained in:
@@ -46,6 +46,10 @@
|
||||
# include "nsServiceManagerUtils.h"
|
||||
#endif
|
||||
|
||||
#ifdef XP_WIN
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifndef XPCOM_GLUE_AVOID_NSPR
|
||||
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS1(nsRunnable, nsIRunnable)
|
||||
@@ -126,6 +130,13 @@ bool NS_IsMainThread()
|
||||
mgr->GetIsMainThread(&result);
|
||||
return bool(result);
|
||||
}
|
||||
#elif defined(XP_WIN)
|
||||
extern DWORD gTLSIsMainThreadIndex;
|
||||
bool
|
||||
NS_IsMainThread()
|
||||
{
|
||||
return !!TlsGetValue(gTLSIsMainThreadIndex);
|
||||
}
|
||||
#elif !defined(NS_TLS)
|
||||
bool NS_IsMainThread()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user