Index: /trunk/src/libs/xpcom18a4/Config.kmk
===================================================================
--- /trunk/src/libs/xpcom18a4/Config.kmk	(revision 102029)
+++ /trunk/src/libs/xpcom18a4/Config.kmk	(revision 102030)
@@ -433,5 +433,4 @@
 	xpcom/threads/nsIEventTarget.idl \
 	xpcom/threads/nsIRunnable.idl \
-	xpcom/threads/nsIThread.idl \
 	xpcom/reflect/xptinfo/public/nsIInterfaceInfo.idl \
 	xpcom/reflect/xptinfo/public/nsIInterfaceInfoManager.idl \
Index: /trunk/src/libs/xpcom18a4/Makefile.kmk
===================================================================
--- /trunk/src/libs/xpcom18a4/Makefile.kmk	(revision 102029)
+++ /trunk/src/libs/xpcom18a4/Makefile.kmk	(revision 102030)
@@ -626,6 +626,5 @@
 	xpcom/threads/nsAutoLock.cpp \
 	xpcom/threads/nsEventQueue.cpp \
-	xpcom/threads/nsEventQueueService.cpp \
-	xpcom/threads/nsThread.cpp
+	xpcom/threads/nsEventQueueService.cpp
 $(evalcall VBOX_XPCOM_X86,VBox-xpcom-threads)
 
@@ -1112,5 +1111,4 @@
 		nsIComponentManager.xpt \
 		nsICategoryManager.xpt \
-		nsIThread.xpt \
 		nsIRunnable.xpt \
 		nsIEventTarget.xpt \
Index: unk/src/libs/xpcom18a4/xpcom/threads/nsIThread.idl
===================================================================
--- /trunk/src/libs/xpcom18a4/xpcom/threads/nsIThread.idl	(revision 102029)
+++ 	(revision )
@@ -1,144 +1,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "nsISupports.idl"
-
-%{C++
-#include "prthread.h"
-
-#define NS_THREAD_CID                                \
-{ /* 85CE5510-7808-11d3-A181-0050041CAF44 */         \
-    0x85ce5510,                                      \
-    0x7808,                                          \
-    0x11d3,                                          \
-    {0xa1, 0x81, 0x00, 0x50, 0x04, 0x1c, 0xaf, 0x44} \
-}
-
-#define NS_THREAD_CONTRACTID "@mozilla.org/thread;1"
-#define NS_THREAD_CLASSNAME "Thread"
-#if 0
-%}
-
-typedef PRUint32 PRThreadPriority;
-typedef PRUint32 PRThreadScope;
-typedef PRUint32 PRThreadState;
-
-%{C++
-#endif
-%}
-
-interface nsIRunnable;
-
-[ptr] native PRThread(PRThread);
-
-[scriptable, uuid(6be5e380-6886-11d3-9382-00104ba0fd40)]
-interface nsIThread : nsISupports
-{
-    // These must all match the values used in prthread.h
-    const PRUint32 PRIORITY_LOW    = 0;
-    const PRUint32 PRIORITY_NORMAL = 1;
-    const PRUint32 PRIORITY_HIGH   = 2;
-    const PRUint32 PRIORITY_URGENT = 3;
-
-    const PRUint32 SCOPE_LOCAL  = 0;
-    const PRUint32 SCOPE_GLOBAL = 1;
-    const PRUint32 SCOPE_BOUND  = 2;
-
-    const PRUint32 STATE_JOINABLE   = 0;
-    const PRUint32 STATE_UNJOINABLE = 1;
-
-    void join();
-    void interrupt();
-
-    attribute PRThreadPriority       priority;
-    readonly attribute PRThreadScope scope;
-    readonly attribute PRThreadState state;
-    
-    [noscript] PRThread GetPRThread();
-    
-    void init(in nsIRunnable aRunnable,
-              in PRUint32 aStackSize,
-              in PRThreadPriority aPriority,
-              in PRThreadScope    aScope,
-              in PRThreadState    aState);
-
-    /*
-     * Get the currently running thread (really a static method sort of thing).
-     */
-    readonly attribute nsIThread currentThread;
-    
-    /*
-     * Sleep to at least this many milliseconds (only works on currrent thread).
-     */
-    void sleep(in PRUint32 msec);
-
-%{C++
-    // returns the nsIThread for the current thread:
-    static NS_COM nsresult GetCurrent(nsIThread* *result);
-
-    // returns the nsIThread for an arbitrary PRThread:
-    static NS_COM nsresult GetIThread(PRThread* prthread, nsIThread* *result);
-
-    // initializes the "main" thread (really, just saves the current thread
-    // at time of calling. meant to be called once at app startup, in lieu
-    // of proper static initializers, to save the primordial thread
-    // for later recall.)
-    static NS_COM nsresult SetMainThread();
-
-    // return the "main" thread
-    static NS_COM nsresult GetMainThread(nsIThread **result);
-
-    static NS_COM PRBool IsMainThread(); 
-%}
-};
-
-%{C++
-extern NS_COM nsresult
-NS_NewThread(nsIThread* *result, 
-             nsIRunnable* runnable,
-             PRUint32 stackSize = 0,
-             PRThreadState state = PR_UNJOINABLE_THREAD,
-             PRThreadPriority priority = PR_PRIORITY_NORMAL,
-             PRThreadScope scope = PR_GLOBAL_THREAD);
-
-extern NS_COM nsresult
-NS_NewThread(nsIThread* *result, 
-             PRUint32 stackSize = 0,
-             PRThreadState state = PR_UNJOINABLE_THREAD,
-             PRThreadPriority priority = PR_PRIORITY_NORMAL,
-             PRThreadScope scope = PR_GLOBAL_THREAD);
-%}
Index: unk/src/libs/xpcom18a4/xpcom/threads/nsThread.cpp
===================================================================
--- /trunk/src/libs/xpcom18a4/xpcom/threads/nsThread.cpp	(revision 102029)
+++ 	(revision )
@@ -1,419 +1,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "nsThread.h"
-#include "prmem.h"
-#include "nsAutoLock.h"
-
-#include <iprt/assert.h>
-#include <VBox/log.h>
-
-RTTLS nsThread::kIThreadSelfIndex = NIL_RTTLS;
-static nsIThread *gMainThread = 0;
-
-////////////////////////////////////////////////////////////////////////////////
-
-nsThread::nsThread()
-    : mThread(nsnull), mDead(PR_FALSE), mStartLock(nsnull)
-{
-    // enforce matching of constants to enums in prthread.h
-    NS_ASSERTION(int(nsIThread::PRIORITY_LOW)     == int(PR_PRIORITY_LOW) &&
-                 int(nsIThread::PRIORITY_NORMAL)  == int(PRIORITY_NORMAL) &&
-                 int(nsIThread::PRIORITY_HIGH)    == int(PRIORITY_HIGH) &&
-                 int(nsIThread::PRIORITY_URGENT)  == int(PRIORITY_URGENT) &&
-                 int(nsIThread::SCOPE_LOCAL)      == int(PR_LOCAL_THREAD) &&
-                 int(nsIThread::SCOPE_GLOBAL)     == int(PR_GLOBAL_THREAD) &&
-                 int(nsIThread::STATE_JOINABLE)   == int(PR_JOINABLE_THREAD) &&
-                 int(nsIThread::STATE_UNJOINABLE) == int(PR_UNJOINABLE_THREAD),
-                 "Bad constant in nsIThread!");
-}
-
-nsThread::~nsThread()
-{
-    if (mStartLock)
-        PR_DestroyLock(mStartLock);
-
-    Log(("nsIThread %p destroyed\n", this));
-
-    // This code used to free the nsIThreadLog loginfo stuff
-    // Don't do that; loginfo structures are owned by nspr
-    // and would be freed if we ever called PR_Cleanup()
-    // see bug 142072
-}
-
-void
-nsThread::Main(void* arg)
-{
-    nsThread* self = (nsThread*)arg;
-
-    self->WaitUntilReadyToStartMain();
-
-    nsresult rv = NS_OK;
-    rv = self->RegisterThreadSelf();
-    NS_ASSERTION(rv == NS_OK, "failed to set thread self");
-
-    Log(("nsIThread %p start run %p\n", self, self->mRunnable.get()));
-    rv = self->mRunnable->Run();
-    NS_ASSERTION(NS_SUCCEEDED(rv), "runnable failed");
-
-#ifdef LOG_ENABLED
-    // Because a thread can die after gMainThread dies and takes nsIThreadLog with it,
-    // we need to check for it being null so that we don't crash on shutdown.
-    PRThreadState state;
-    rv = self->GetState(&state);
-    Log(("nsIThread %p end run %p\n", self, self->mRunnable.get()));
-#endif
-
-    // explicitly drop the runnable now in case there are circular references
-    // between it and the thread object
-    self->mRunnable = nsnull;
-}
-
-DECLCALLBACK(void)
-nsThread::Exit(void* arg)
-{
-    nsThread* self = (nsThread*)arg;
-
-    if (self->mDead) {
-        NS_ERROR("attempt to Exit() thread twice");
-        return;
-    }
-
-    self->mDead = PR_TRUE;
-
-    Log(("nsIThread %p exited\n", self));
-    NS_RELEASE(self);
-}
-
-NS_METHOD
-nsThread::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult)
-{
-    nsThread* thread = new nsThread();
-    if (!thread) return NS_ERROR_OUT_OF_MEMORY;
-    nsresult rv = thread->QueryInterface(aIID, aResult);
-    if (NS_FAILED(rv)) delete thread;
-    return rv;
-}
-
-NS_IMPL_THREADSAFE_ISUPPORTS1(nsThread, nsIThread)
-
-NS_IMETHODIMP
-nsThread::Join()
-{
-    // don't check for mDead here because nspr calls Exit (cleaning up
-    // thread-local storage) before they let us join with the thread
-
-    Log(("nsIThread %p start join\n", this));
-    if (!mThread)
-        return NS_ERROR_NOT_INITIALIZED;
-    PRStatus status = PR_JoinThread(mThread);
-    // XXX can't use NS_RELEASE here because the macro wants to set
-    // this to null (bad c++)
-    Log(("nsIThread %p end join\n", this));
-    if (status == PR_SUCCESS) {
-        NS_RELEASE_THIS();   // most likely the final release of this thread 
-        return NS_OK;
-    }
-    else
-        return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsThread::GetPriority(PRThreadPriority *result)
-{
-    if (mDead)
-        return NS_ERROR_FAILURE;
-    if (!mThread)
-        return NS_ERROR_NOT_INITIALIZED;
-    *result = PR_GetThreadPriority(mThread);
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsThread::SetPriority(PRThreadPriority value)
-{
-    if (mDead)
-        return NS_ERROR_FAILURE;
-    if (!mThread)
-        return NS_ERROR_NOT_INITIALIZED;
-    PR_SetThreadPriority(mThread, value);
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsThread::Interrupt()
-{
-    if (mDead)
-        return NS_ERROR_FAILURE;
-    if (!mThread)
-        return NS_ERROR_NOT_INITIALIZED;
-    PRStatus status = PR_Interrupt(mThread);
-    return status == PR_SUCCESS ? NS_OK : NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsThread::GetScope(PRThreadScope *result)
-{
-    if (mDead)
-        return NS_ERROR_FAILURE;
-    if (!mThread)
-        return NS_ERROR_NOT_INITIALIZED;
-    *result = PR_GetThreadScope(mThread);
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsThread::GetState(PRThreadState *result)
-{
-    if (mDead)
-        return NS_ERROR_FAILURE;
-    if (!mThread)
-        return NS_ERROR_NOT_INITIALIZED;
-    *result = PR_GetThreadState(mThread);
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsThread::GetPRThread(PRThread* *result)
-{
-    if (mDead) {
-        *result = nsnull;
-        return NS_ERROR_FAILURE;
-    }    
-    *result = mThread;
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsThread::Init(nsIRunnable* runnable,
-               PRUint32 stackSize,
-               PRThreadPriority priority,
-               PRThreadScope scope,
-               PRThreadState state)
-{
-    NS_ENSURE_ARG_POINTER(runnable);
-    mRunnable = runnable;
-
-    NS_ADDREF_THIS();   // released in nsThread::Exit
-    if (state == PR_JOINABLE_THREAD)
-        NS_ADDREF_THIS();   // released in nsThread::Join
-    mStartLock = PR_NewLock();
-    if (mStartLock == nsnull)
-        return NS_ERROR_OUT_OF_MEMORY;
-    PR_Lock(mStartLock);
-    mThread = PR_CreateThread(PR_USER_THREAD, Main, this,
-                              priority, scope, state, stackSize);
-    PR_Unlock(mStartLock);
-    Log(("nsIThread %p created\n", this));
-
-    if (mThread == nsnull)
-        return NS_ERROR_OUT_OF_MEMORY;
-    return NS_OK;
-}
-
-/* readonly attribute nsIThread currentThread; */
-NS_IMETHODIMP 
-nsThread::GetCurrentThread(nsIThread * *aCurrentThread)
-{
-    return GetIThread(PR_GetCurrentThread(), aCurrentThread);
-}
-
-/* void sleep (in PRUint32 msec); */
-NS_IMETHODIMP 
-nsThread::Sleep(PRUint32 msec)
-{
-    if (PR_GetCurrentThread() != mThread)
-        return NS_ERROR_FAILURE;
-
-    if (RTThreadSleep(msec) != VINF_SUCCESS)
-        return NS_ERROR_FAILURE;
-
-    return NS_OK;
-}
-
-NS_COM nsresult
-NS_NewThread(nsIThread* *result, 
-             nsIRunnable* runnable,
-             PRUint32 stackSize,
-             PRThreadState state,
-             PRThreadPriority priority,
-             PRThreadScope scope)
-{
-    nsresult rv;
-    nsThread* thread = new nsThread();
-    if (thread == nsnull)
-        return NS_ERROR_OUT_OF_MEMORY;
-    NS_ADDREF(thread);
-
-    rv = thread->Init(runnable, stackSize, priority, scope, state);
-    if (NS_FAILED(rv)) {
-        NS_RELEASE(thread);
-        return rv;
-    }
-
-    *result = thread;
-    return NS_OK;
-}
-
-NS_COM nsresult
-NS_NewThread(nsIThread* *result, 
-             PRUint32 stackSize,
-             PRThreadState state,
-             PRThreadPriority priority,
-             PRThreadScope scope)
-{
-    nsThread* thread = new nsThread();
-    if (thread == nsnull)
-        return NS_ERROR_OUT_OF_MEMORY;
-    NS_ADDREF(thread);
-    *result = thread;
-    return NS_OK;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-
-nsresult
-nsThread::RegisterThreadSelf()
-{
-    int vrc;
-
-    if (kIThreadSelfIndex == NIL_RTTLS) {
-        vrc = RTTlsAllocEx(&kIThreadSelfIndex, Exit);
-        if (RT_FAILURE(vrc)) return NS_ERROR_FAILURE;
-    }
-
-    vrc = RTTlsSet(kIThreadSelfIndex, this);
-    if (RT_FAILURE(vrc)) return NS_ERROR_FAILURE;
-
-    return NS_OK;
-}
-
-void 
-nsThread::WaitUntilReadyToStartMain()
-{
-    PR_Lock(mStartLock);
-    PR_Unlock(mStartLock);
-    PR_DestroyLock(mStartLock);
-    mStartLock = nsnull;
-}
-
-NS_COM nsresult
-nsIThread::GetCurrent(nsIThread* *result)
-{
-    return GetIThread(PR_GetCurrentThread(), result);
-}
-
-NS_COM nsresult
-nsIThread::GetIThread(PRThread* prthread, nsIThread* *result)
-{
-    nsThread* thread;
-
-    if (nsThread::kIThreadSelfIndex == NIL_RTTLS) {
-        int vrc = RTTlsAllocEx(&nsThread::kIThreadSelfIndex, nsThread::Exit);
-        if (RT_FAILURE(vrc)) return NS_ERROR_FAILURE;
-    }
-
-    thread = (nsThread*)RTTlsGet(nsThread::kIThreadSelfIndex);
-    if (thread == nsnull) {
-        // if the current thread doesn't have an nsIThread associated
-        // with it, make one
-        thread = new nsThread();
-        if (thread == nsnull)
-            return NS_ERROR_OUT_OF_MEMORY;
-        NS_ADDREF(thread);      // released by Exit
-        thread->SetPRThread(prthread);
-        nsresult rv = thread->RegisterThreadSelf();
-        if (NS_FAILED(rv)) return rv;
-    }
-    NS_ADDREF(thread);
-    *result = thread;
-    return NS_OK;
-}
-
-NS_COM nsresult
-nsIThread::SetMainThread()
-{
-    // strictly speaking, it could be set twice. but practically speaking,
-    // it's almost certainly an error if it is
-    if (gMainThread != 0) {
-        NS_ERROR("Setting main thread twice?");
-        return NS_ERROR_FAILURE;
-    }
-    return GetCurrent(&gMainThread);
-}
-
-NS_COM nsresult
-nsIThread::GetMainThread(nsIThread **result)
-{
-    NS_ASSERTION(result, "bad result pointer");
-    if (gMainThread == 0)
-        return NS_ERROR_FAILURE;
-    *result = gMainThread;
-    NS_ADDREF(gMainThread);
-    return NS_OK;
-}
-
-NS_COM PRBool
-nsIThread::IsMainThread()
-{
-    if (gMainThread == 0)
-        return PR_TRUE;
-    
-    PRThread *theMainThread;
-    gMainThread->GetPRThread(&theMainThread);
-    return theMainThread == PR_GetCurrentThread();
-}
-
-void 
-nsThread::Shutdown()
-{
-    if (gMainThread) {
-        // XXX nspr doesn't seem to be calling the main thread's destructor
-        // callback, so let's help it out:
-        nsThread::Exit(NS_STATIC_CAST(nsThread*, gMainThread));
-        nsrefcnt cnt;
-        NS_RELEASE2(gMainThread, cnt);
-        NS_WARN_IF_FALSE(cnt == 0, "Main thread being held past XPCOM shutdown.");
-        gMainThread = nsnull;
-
-        int vrc = RTTlsFree(kIThreadSelfIndex);
-        AssertRC(vrc); RT_NOREF(vrc);
-        kIThreadSelfIndex = NIL_RTTLS;
-    }
-}
-
-////////////////////////////////////////////////////////////////////////////////
Index: unk/src/libs/xpcom18a4/xpcom/threads/nsThread.h
===================================================================
--- /trunk/src/libs/xpcom18a4/xpcom/threads/nsThread.h	(revision 102029)
+++ 	(revision )
@@ -1,96 +1,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK *****
- * This Original Code has been modified by IBM Corporation.
- * Modifications made by IBM described herein are
- * Copyright (c) International Business Machines
- * Corporation, 2000
- *
- * Modifications to Mozilla code or documentation
- * identified per MPL Section 3.3
- *
- * Date             Modified by     Description of modification
- * 04/20/2000       IBM Corp.      Added PR_CALLBACK for Optlink use in OS2
- */
-
-#ifndef nsThread_h__
-#define nsThread_h__
-
-#include "nsIRunnable.h"
-#include "nsIThread.h"
-#include "nsCOMPtr.h"
-
-#include "prlock.h"
-
-#include <iprt/thread.h>
-
-class nsThread : public nsIThread 
-{
-public:
-    NS_DECL_ISUPPORTS
-
-    // nsIThread methods:
-    NS_DECL_NSITHREAD
- 
-    // nsThread methods:
-    nsThread();
-
-    nsresult RegisterThreadSelf();
-    void SetPRThread(PRThread* thread) { mThread = thread; }
-    void WaitUntilReadyToStartMain();
-
-    static void PR_CALLBACK Main(void* arg);
-    static DECLCALLBACK(void) Exit(void* arg);
-    static void PR_CALLBACK Shutdown();
-
-    static RTTLS kIThreadSelfIndex;
-
-    static NS_METHOD
-    Create(nsISupports* outer, const nsIID& aIID, void* *aInstancePtr);
-
-private:
-    ~nsThread();
-
-protected:
-    PRThread*                   mThread;
-    nsCOMPtr<nsIRunnable>       mRunnable;
-    PRBool                      mDead;
-    PRLock*                     mStartLock;
-};
-
-////////////////////////////////////////////////////////////////////////////////
-
-#endif // nsThread_h__
