| ... |
... |
@@ -314,7 +314,7 @@ static nsIProfileLock* gProfileLock; |
|
314
|
314
|
constinit static RefPtr<nsRemoteService> gRemoteService;
|
|
315
|
315
|
constinit static RefPtr<nsStartupLock> gStartupLock;
|
|
316
|
316
|
// tor-browser#43107: Disable remoting by default.
|
|
317
|
|
-bool gDisableRemoting = true;
|
|
|
317
|
+bool gEnableRemoting = false;
|
|
318
|
318
|
#endif
|
|
319
|
319
|
|
|
320
|
320
|
int gRestartArgc;
|
| ... |
... |
@@ -2095,8 +2095,8 @@ nsresult ScopedXPCOMStartup::SetWindowCreator(nsINativeAppSupport* native) { |
|
2095
|
2095
|
/* static */ already_AddRefed<nsIRemoteService> GetRemoteService() {
|
|
2096
|
2096
|
AssertIsOnMainThread();
|
|
2097
|
2097
|
|
|
2098
|
|
- if (!gRemoteService && !gDisableRemoting) {
|
|
2099
|
|
- gRemoteService = new nsRemoteService();
|
|
|
2098
|
+ if (!gRemoteService) {
|
|
|
2099
|
+ gRemoteService = new nsRemoteService(gEnableRemoting);
|
|
2100
|
2100
|
}
|
|
2101
|
2101
|
nsCOMPtr<nsIRemoteService> remoteService = gRemoteService.get();
|
|
2102
|
2102
|
return remoteService.forget();
|
| ... |
... |
@@ -4487,7 +4487,7 @@ int XREMain::XRE_mainInit(bool* aExitFlag) { |
|
4487
|
4487
|
// The user can still enable remoting if they want to, by adding the
|
|
4488
|
4488
|
// allow-remote parameter to the command line.
|
|
4489
|
4489
|
if (CheckArg("allow-remote") == ARG_FOUND) {
|
|
4490
|
|
- gDisableRemoting = false;
|
|
|
4490
|
+ gEnableRemoting = true;
|
|
4491
|
4491
|
}
|
|
4492
|
4492
|
#else
|
|
4493
|
4493
|
// These arguments do nothing in platforms with no remoting support but we
|
| ... |
... |
@@ -4882,7 +4882,7 @@ int XREMain::XRE_mainStartup(bool* aExitFlag) { |
|
4882
|
4882
|
|
|
4883
|
4883
|
#ifdef MOZ_HAS_REMOTE
|
|
4884
|
4884
|
if (gfxPlatform::IsHeadless()) {
|
|
4885
|
|
- gDisableRemoting = true;
|
|
|
4885
|
+ gEnableRemoting = false;
|
|
4886
|
4886
|
}
|
|
4887
|
4887
|
#endif
|
|
4888
|
4888
|
|
| ... |
... |
@@ -5004,10 +5004,8 @@ int XREMain::XRE_mainStartup(bool* aExitFlag) { |
|
5004
|
5004
|
}
|
|
5005
|
5005
|
#endif
|
|
5006
|
5006
|
#if defined(MOZ_HAS_REMOTE)
|
|
5007
|
|
- if (!gDisableRemoting) {
|
|
5008
|
|
- // handle --remote now that xpcom is fired up
|
|
5009
|
|
- gRemoteService = new nsRemoteService();
|
|
5010
|
|
- }
|
|
|
5007
|
+ // handle --remote now that xpcom is fired up
|
|
|
5008
|
+ gRemoteService = new nsRemoteService(gEnableRemoting);
|
|
5011
|
5009
|
if (gRemoteService) {
|
|
5012
|
5010
|
gRemoteService->SetProgram(gAppData->remotingName);
|
|
5013
|
5011
|
gStartupLock = gRemoteService->LockStartup();
|
| ... |
... |
@@ -5092,7 +5090,7 @@ int XREMain::XRE_mainStartup(bool* aExitFlag) { |
|
5092
|
5090
|
if (NS_SUCCEEDED(rv)) {
|
|
5093
|
5091
|
gRemoteService->SetProfile(profilePath);
|
|
5094
|
5092
|
|
|
5095
|
|
- if (!gDisableRemoting) {
|
|
|
5093
|
+ if (gEnableRemoting) {
|
|
5096
|
5094
|
// Try to remote the entire command line. If this fails, start up
|
|
5097
|
5095
|
// normally.
|
|
5098
|
5096
|
# ifdef MOZ_WIDGET_GTK
|