| ... |
... |
@@ -320,7 +320,7 @@ static nsIProfileLock* gProfileLock; |
|
320
|
320
|
MOZ_RUNINIT static RefPtr<nsRemoteService> gRemoteService;
|
|
321
|
321
|
MOZ_RUNINIT static RefPtr<nsStartupLock> gStartupLock;
|
|
322
|
322
|
// tor-browser#43107: Disable remoting by default.
|
|
323
|
|
-bool gDisableRemoting = true;
|
|
|
323
|
+bool gEnableRemoting = false;
|
|
324
|
324
|
#endif
|
|
325
|
325
|
|
|
326
|
326
|
int gRestartArgc;
|
| ... |
... |
@@ -2118,8 +2118,8 @@ nsresult ScopedXPCOMStartup::SetWindowCreator(nsINativeAppSupport* native) { |
|
2118
|
2118
|
/* static */ already_AddRefed<nsIRemoteService> GetRemoteService() {
|
|
2119
|
2119
|
AssertIsOnMainThread();
|
|
2120
|
2120
|
|
|
2121
|
|
- if (!gRemoteService && !gDisableRemoting) {
|
|
2122
|
|
- gRemoteService = new nsRemoteService();
|
|
|
2121
|
+ if (!gRemoteService) {
|
|
|
2122
|
+ gRemoteService = new nsRemoteService(gEnableRemoting);
|
|
2123
|
2123
|
}
|
|
2124
|
2124
|
nsCOMPtr<nsIRemoteService> remoteService = gRemoteService.get();
|
|
2125
|
2125
|
return remoteService.forget();
|
| ... |
... |
@@ -4496,7 +4496,7 @@ int XREMain::XRE_mainInit(bool* aExitFlag) { |
|
4496
|
4496
|
// The user can still enable remoting if they want to, by adding the
|
|
4497
|
4497
|
// allow-remote parameter to the command line.
|
|
4498
|
4498
|
if (CheckArg("allow-remote") == ARG_FOUND) {
|
|
4499
|
|
- gDisableRemoting = false;
|
|
|
4499
|
+ gEnableRemoting = true;
|
|
4500
|
4500
|
}
|
|
4501
|
4501
|
#else
|
|
4502
|
4502
|
// These arguments do nothing in platforms with no remoting support but we
|
| ... |
... |
@@ -4870,7 +4870,7 @@ int XREMain::XRE_mainStartup(bool* aExitFlag) { |
|
4870
|
4870
|
|
|
4871
|
4871
|
#ifdef MOZ_HAS_REMOTE
|
|
4872
|
4872
|
if (gfxPlatform::IsHeadless()) {
|
|
4873
|
|
- gDisableRemoting = true;
|
|
|
4873
|
+ gEnableRemoting = false;
|
|
4874
|
4874
|
}
|
|
4875
|
4875
|
#endif
|
|
4876
|
4876
|
|
| ... |
... |
@@ -4992,10 +4992,8 @@ int XREMain::XRE_mainStartup(bool* aExitFlag) { |
|
4992
|
4992
|
}
|
|
4993
|
4993
|
#endif
|
|
4994
|
4994
|
#if defined(MOZ_HAS_REMOTE)
|
|
4995
|
|
- if (!gDisableRemoting) {
|
|
4996
|
|
- // handle --remote now that xpcom is fired up
|
|
4997
|
|
- gRemoteService = new nsRemoteService();
|
|
4998
|
|
- }
|
|
|
4995
|
+ // handle --remote now that xpcom is fired up
|
|
|
4996
|
+ gRemoteService = new nsRemoteService(gEnableRemoting);
|
|
4999
|
4997
|
if (gRemoteService) {
|
|
5000
|
4998
|
gRemoteService->SetProgram(gAppData->remotingName);
|
|
5001
|
4999
|
gStartupLock = gRemoteService->LockStartup();
|
| ... |
... |
@@ -5080,7 +5078,7 @@ int XREMain::XRE_mainStartup(bool* aExitFlag) { |
|
5080
|
5078
|
if (NS_SUCCEEDED(rv)) {
|
|
5081
|
5079
|
gRemoteService->SetProfile(profilePath);
|
|
5082
|
5080
|
|
|
5083
|
|
- if (!gDisableRemoting) {
|
|
|
5081
|
+ if (gEnableRemoting) {
|
|
5084
|
5082
|
// Try to remote the entire command line. If this fails, start up
|
|
5085
|
5083
|
// normally.
|
|
5086
|
5084
|
# ifdef MOZ_WIDGET_GTK
|