$OpenBSD$ index e0873e6..cadc46d 100644 --- toolkit/xre/nsAppRunner.cpp.orig Fri Feb 20 15:40:39 2015 +++ toolkit/xre/nsAppRunner.cpp Fri Feb 20 15:40:39 2015 @@ -1412,7 +1412,8 @@ DumpHelp() " -P Start with .\n" " -migration Start with migration wizard.\n" " -ProfileManager Start with ProfileManager.\n" - " -no-remote Do not accept or send remote commands; implies -new-instance.\n" + " -no-remote (default) Do not accept or send remote commands; implies -new-instance.\n" + " -allow-remote Accept and send remote commands.\n" " -new-instance Open new instance, not a new window in running instance.\n" " -UILocale Start with resources as UI Locale.\n" " -safe-mode Disables extensions and themes for this session.\n", gAppData->name); @@ -2917,19 +2918,8 @@ XREMain::XRE_mainInit(bool* aExitFlag) #endif #ifdef MOZ_ACCESSIBILITY_ATK - // Reset GTK_MODULES, strip atk-bridge if exists - // Mozilla will load libatk-bridge.so later if necessary - const char* gtkModules = PR_GetEnv("GTK_MODULES"); - if (gtkModules && *gtkModules) { - nsCString gtkModulesStr(gtkModules); - gtkModulesStr.ReplaceSubstring("atk-bridge", ""); - char* expr = PR_smprintf("GTK_MODULES=%s", gtkModulesStr.get()); - if (expr) - PR_SetEnv(expr); - // We intentionally leak |expr| here since it is required by PR_SetEnv. - } - - // Suppress atk-bridge init at startup, it works after GNOME 2.24.2 + // Suppress atk-bridge init at startup, until mozilla accessibility is + // initialized. This works after gnome 2.24.2. SaveToEnv("NO_AT_BRIDGE=1"); #endif @@ -3163,6 +3153,11 @@ XREMain::XRE_mainInit(bool* aExitFlag) gSafeMode = true; #endif + // In the Tor Browser, remoting is disabled by default unless -osint is used. + bool allowRemote = (CheckArg("allow-remote") == ARG_FOUND); + if (!allowRemote && (CheckArg("osint", false, nullptr, false) != ARG_FOUND)) + SaveToEnv("MOZ_NO_REMOTE=1"); + // Handle -no-remote and -new-instance command line arguments. Setup // the environment to better accommodate other components and various // restart scenarios. @@ -3170,8 +3165,9 @@ XREMain::XRE_mainInit(bool* aExitFlag) if (ar == ARG_BAD) { PR_fprintf(PR_STDERR, "Error: argument -no-remote is invalid when argument -osint is specified\n"); return 1; - } else if (ar == ARG_FOUND) { - SaveToEnv("MOZ_NO_REMOTE=1"); + } else if ((ar == ARG_FOUND) && allowRemote) { + PR_fprintf(PR_STDERR, "Error: argument -no-remote is invalid when argument -allow-remote is specified\n"); + return 1; } ar = CheckArg("new-instance", true); @@ -3614,12 +3610,20 @@ XREMain::XRE_mainStartup(bool* aExitFlag) NS_ENSURE_SUCCESS(rv, 1); rv = exeFile->GetParent(getter_AddRefs(exeDir)); NS_ENSURE_SUCCESS(rv, 1); +#ifdef TOR_BROWSER_UPDATE + nsAutoCString compatVersion(TOR_BROWSER_VERSION); +#endif ProcessUpdates(mDirProvider.GetGREDir(), exeDir, updRoot, gRestartArgc, gRestartArgv, - mAppData->version); +#ifdef TOR_BROWSER_UPDATE + compatVersion.get() +#else + mAppData->version +#endif + ); if (EnvHasValue("MOZ_PROCESS_UPDATES")) { SaveToEnv("MOZ_PROCESS_UPDATES="); *aExitFlag = true;