зеркало из https://github.com/mozilla/pjs.git
honor the running state of the xremote service. not part of the build.
This commit is contained in:
Родитель
2e22a5a567
Коммит
a4eccb3cef
|
@ -60,6 +60,7 @@ XRemoteService::XRemoteService()
|
|||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
mNumWindows = 0;
|
||||
mRunning = PR_FALSE;
|
||||
}
|
||||
|
||||
XRemoteService::~XRemoteService()
|
||||
|
@ -72,6 +73,7 @@ NS_IMPL_ISUPPORTS1(XRemoteService, nsIXRemoteService)
|
|||
NS_IMETHODIMP
|
||||
XRemoteService::Startup(void)
|
||||
{
|
||||
mRunning = PR_TRUE;
|
||||
if (mNumWindows == 0)
|
||||
CreateProxyWindow();
|
||||
return NS_OK;
|
||||
|
@ -81,6 +83,7 @@ NS_IMETHODIMP
|
|||
XRemoteService::Shutdown(void)
|
||||
{
|
||||
DestroyProxyWindow();
|
||||
mRunning = PR_FALSE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -402,7 +405,7 @@ NS_IMETHODIMP
|
|||
XRemoteService::RemoveBrowserInstance(nsIDOMWindowInternal *aBrowser)
|
||||
{
|
||||
mNumWindows--;
|
||||
if (mNumWindows == 0)
|
||||
if (mNumWindows == 0 && mRunning)
|
||||
CreateProxyWindow();
|
||||
|
||||
// remove our keys
|
||||
|
|
|
@ -91,4 +91,7 @@ class XRemoteService : public nsIXRemoteService {
|
|||
// the number of non-proxy windows that are set up for X Remote
|
||||
PRUint32 mNumWindows;
|
||||
|
||||
// have we been started up from the main loop yet?
|
||||
PRBool mRunning;
|
||||
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче