Bug 1547756 - remove support for -register commandline flag because it's bogus in 2019, r=froydnj

Apparently introduced by bryner back in 2002, and refactored numerous times without too much scrutiny, this:
- presumably was there for binary components (which are no longer supported)
- or external (add-on) restart-required components (ditto)
- or really any non-builtin components (ditto)
- and would presumably at one point store data somewhere... except that's kinda hard without a profile.
- seems to have never been documented, as far as I can tell.

So let's remove it.

Differential Revision: https://phabricator.services.mozilla.com/D29229

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Gijs Kruitbosch 2019-04-29 18:24:32 +00:00
parent 318a177f68
commit 0094c57bf2

View File

@ -3399,30 +3399,6 @@ int XREMain::XRE_mainInit(bool* aExitFlag) {
rv = XRE_InitCommandLine(gArgc, gArgv);
NS_ENSURE_SUCCESS(rv, 1);
// Check for --register, which registers chrome and then exits immediately.
ar = CheckArg("register", nullptr,
CheckArgFlag::CheckOSInt | CheckArgFlag::RemoveArg);
if (ar == ARG_BAD) {
PR_fprintf(PR_STDERR,
"Error: argument --register is invalid when argument --osint is "
"specified\n");
return 1;
}
if (ar == ARG_FOUND) {
ScopedXPCOMStartup xpcom;
rv = xpcom.Initialize();
NS_ENSURE_SUCCESS(rv, 1);
{
nsCOMPtr<nsIChromeRegistry> chromeReg =
mozilla::services::GetChromeRegistryService();
NS_ENSURE_TRUE(chromeReg, 1);
chromeReg->CheckForNewChrome();
}
*aExitFlag = true;
return 0;
}
return 0;
}