adding access to primordial thread

This commit is contained in:
danm@netscape.com
1999-06-11 03:44:52 +00:00
parent 7193696e94
commit 2273202f2a
2 changed files with 11 additions and 0 deletions

View File

@@ -93,6 +93,9 @@ public:
NS_IMETHOD Initialize(nsICmdLineService*aCmdLineService);
NS_IMETHOD Run(void);
NS_IMETHOD Shutdown(void);
NS_IMETHOD GetPrimordialThread(PRThread **aThread)
{ *aThread = mPrimordialThread; return NS_OK; }
NS_IMETHOD CreateTopLevelWindow(nsIWebShellWindow * aParent,
nsIURL* aUrl,
PRBool showWindow,
@@ -125,6 +128,7 @@ protected:
nsIAppShell* mAppShell;
nsISupportsArray* mWindowList;
nsICmdLineService* mCmdLineService;
PRThread* mPrimordialThread;
};
@@ -135,6 +139,7 @@ nsAppShellService::nsAppShellService()
mAppShell = nsnull;
mWindowList = nsnull;
mCmdLineService = nsnull;
mPrimordialThread = nsnull;
}
nsAppShellService::~nsAppShellService()
@@ -162,6 +167,10 @@ nsAppShellService::Initialize( nsICmdLineService *aCmdLineService )
#ifdef MOZ_FULLCIRCLE
FCInitialize();
#endif
// assume no new threads have been spun up yet, or at least if they have,
// they haven't been made the current one
mPrimordialThread = PR_CurrentThread();
// Remember cmd line service.
mCmdLineService = aCmdLineService;
NS_IF_ADDREF( mCmdLineService );