зеркало из https://github.com/mozilla/pjs.git
Bug 650078 - Make -no-remote not listen for remote commands when using X (r=bsmedberg)
--HG-- extra : rebase_source : 580c0f00695db5f0d25f3afd78fa1a853d76d360
This commit is contained in:
Родитель
c3e2026d68
Коммит
f8299ebd35
|
@ -3072,6 +3072,11 @@ XRE_main(int argc, char* argv[], const nsXREAppData* aAppData)
|
||||||
|
|
||||||
#ifdef MOZ_ENABLE_XREMOTE
|
#ifdef MOZ_ENABLE_XREMOTE
|
||||||
// handle -remote now that xpcom is fired up
|
// handle -remote now that xpcom is fired up
|
||||||
|
bool disableRemote = false;
|
||||||
|
{
|
||||||
|
char *e = PR_GetEnv("MOZ_NO_REMOTE");
|
||||||
|
disableRemote = (e && *e);
|
||||||
|
}
|
||||||
|
|
||||||
const char* xremotearg;
|
const char* xremotearg;
|
||||||
ar = CheckArg("remote", PR_TRUE, &xremotearg);
|
ar = CheckArg("remote", PR_TRUE, &xremotearg);
|
||||||
|
@ -3085,7 +3090,7 @@ XRE_main(int argc, char* argv[], const nsXREAppData* aAppData)
|
||||||
return HandleRemoteArgument(xremotearg, desktopStartupIDPtr);
|
return HandleRemoteArgument(xremotearg, desktopStartupIDPtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!PR_GetEnv("MOZ_NO_REMOTE")) {
|
if (!disableRemote) {
|
||||||
// Try to remote the entire command line. If this fails, start up normally.
|
// Try to remote the entire command line. If this fails, start up normally.
|
||||||
RemoteResult rr = RemoteCommandLine(desktopStartupIDPtr);
|
RemoteResult rr = RemoteCommandLine(desktopStartupIDPtr);
|
||||||
if (rr == REMOTE_FOUND)
|
if (rr == REMOTE_FOUND)
|
||||||
|
@ -3527,7 +3532,8 @@ XRE_main(int argc, char* argv[], const nsXREAppData* aAppData)
|
||||||
#ifdef MOZ_ENABLE_XREMOTE
|
#ifdef MOZ_ENABLE_XREMOTE
|
||||||
// if we have X remote support, start listening for requests on the
|
// if we have X remote support, start listening for requests on the
|
||||||
// proxy window.
|
// proxy window.
|
||||||
remoteService = do_GetService("@mozilla.org/toolkit/remote-service;1");
|
if (!disableRemote)
|
||||||
|
remoteService = do_GetService("@mozilla.org/toolkit/remote-service;1");
|
||||||
if (remoteService)
|
if (remoteService)
|
||||||
remoteService->Startup(gAppData->name,
|
remoteService->Startup(gAppData->name,
|
||||||
PromiseFlatCString(profileName).get());
|
PromiseFlatCString(profileName).get());
|
||||||
|
|
Загрузка…
Ссылка в новой задаче