mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-02 06:22:20 +00:00
adding access to primordial thread
This commit is contained in:
parent
3937d3f3d0
commit
a94047bcd2
@ -25,6 +25,7 @@
|
||||
#include "nsISupports.h"
|
||||
|
||||
/* Forward declarations... */
|
||||
struct PRThread;
|
||||
class nsIFactory;
|
||||
class nsIURL;
|
||||
class nsIWebShellWindow;
|
||||
@ -47,6 +48,7 @@ public:
|
||||
NS_IMETHOD Initialize(nsICmdLineService * aCmdLineService) = 0;
|
||||
NS_IMETHOD Run(void) = 0;
|
||||
NS_IMETHOD Shutdown(void) = 0;
|
||||
NS_IMETHOD GetPrimordialThread(PRThread **aThread) = 0;
|
||||
|
||||
NS_IMETHOD CreateTopLevelWindow(nsIWebShellWindow * aParent,
|
||||
nsIURL* aUrl,
|
||||
|
@ -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 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user