Bug 1547756 - remove support for -register commandline flag because it's bogus in 2019, r=froydnj
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Mon, 29 Apr 2019 18:24:32 +0000
changeset 530604 a558a615474857b1b6ff193166d2746c8ecb1358
parent 530603 aec4b19308a9b4eb59e2b988840af1d8996825c8
child 530605 f6766ba4ac77c6757c4e4db7598a2e685f23fcf6
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1547756
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
toolkit/xre/nsAppRunner.cpp
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -3394,40 +3394,16 @@ int XREMain::XRE_mainInit(bool* aExitFla
     DumpVersion();
     *aExitFlag = true;
     return 0;
   }
 
   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;
 }
 
 #ifdef XP_WIN
 static bool QueryOneWMIProperty(IWbemServices* aServices,
                                 const wchar_t* aWMIClass,
                                 const wchar_t* aProperty, VARIANT* aResult) {
   RefPtr<IEnumWbemClassObject> enumerator;