Bug 1306327 - Remove the flags argument to XRE_main. r=bsmedberg
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 10 Jan 2017 14:15:50 +0900
changeset 462788 d6d7a6e9a3d9e9bace62823719517e7cbdb2bb5e
parent 462787 398e907e9a9c44b7ff525b2199cb81cea7695f75
child 462789 8e583d30ce9816b92a180ce34b0559c7e09e04a3
push id41857
push userbmo:mh+mozilla@glandium.org
push dateWed, 18 Jan 2017 00:24:11 +0000
reviewersbsmedberg
bugs1306327, 1039866
milestone53.0a1
Bug 1306327 - Remove the flags argument to XRE_main. r=bsmedberg This hasn't been used since the removal of the Metro code in bug 1039866, close to two years ago.
b2g/app/nsBrowserApp.cpp
browser/app/nsBrowserApp.cpp
embedding/ios/GeckoEmbed/GeckoEmbed/main.mm
toolkit/xre/nsAndroidStartup.cpp
toolkit/xre/nsAppRunner.cpp
xpcom/build/nsXULAppAPI.h
--- a/b2g/app/nsBrowserApp.cpp
+++ b/b2g/app/nsBrowserApp.cpp
@@ -141,22 +141,22 @@ static int do_main(int argc, char* argv[
 
   if (appini) {
     nsXREAppData *appData;
     rv = XRE_CreateAppData(appini, &appData);
     if (NS_FAILED(rv)) {
       Output("Couldn't read application.ini");
       return 255;
     }
-    int result = XRE_main(argc, argv, appData, 0);
+    int result = XRE_main(argc, argv, appData);
     XRE_FreeAppData(appData);
     return result;
   }
 
-  return XRE_main(argc, argv, &sAppData, 0);
+  return XRE_main(argc, argv, &sAppData);
 }
 
 int main(int argc, char* argv[])
 {
   char exePath[MAXPATHLEN];
 
 #ifdef MOZ_WIDGET_GONK
   // This creates a ThreadPool for binder ipc. A ThreadPool is necessary to
--- a/browser/app/nsBrowserApp.cpp
+++ b/browser/app/nsBrowserApp.cpp
@@ -206,17 +206,16 @@ void libFuzzerGetFuncs(const char* modul
   return XRE_LibFuzzerGetFuncs(moduleName, initFunc, testingFunc);
 }
 #endif
 
 static int do_main(int argc, char* argv[], char* envp[])
 {
   nsCOMPtr<nsIFile> appini;
   nsresult rv;
-  uint32_t mainFlags = 0;
 
   // Allow firefox.exe to launch XULRunner apps via -app <application.ini>
   // Note that -app must be the *first* argument.
   const char *appDataFile = getenv("XUL_APP_FILE");
   if (appDataFile && *appDataFile) {
     rv = XRE_GetFileFromPath(appDataFile, getter_AddRefs(appini));
     if (NS_FAILED(rv)) {
       Output("Invalid path found: '%s'", appDataFile);
@@ -310,17 +309,17 @@ static int do_main(int argc, char* argv[
   appData.sandboxBrokerServices = brokerServices;
 #endif
 
 #ifdef LIBFUZZER
   if (getenv("LIBFUZZER"))
     XRE_LibFuzzerSetMain(argc, argv, libfuzzer_main);
 #endif
 
-  return XRE_main(argc, argv, appData, mainFlags);
+  return XRE_main(argc, argv, appData);
 }
 
 static bool
 FileExists(const char *path)
 {
 #ifdef XP_WIN
   wchar_t wideDir[MAX_PATH];
   MultiByteToWideChar(CP_UTF8, 0, path, -1, wideDir, MAX_PATH);
--- a/embedding/ios/GeckoEmbed/GeckoEmbed/main.mm
+++ b/embedding/ios/GeckoEmbed/GeckoEmbed/main.mm
@@ -86,11 +86,11 @@ int main(int argc, char * argv[]) {
   nsCOMPtr<nsIFile> appSubdir;
   greDir->Clone(getter_AddRefs(appSubdir));
   greDir->Append(NS_LITERAL_STRING("Frameworks"));
   appSubdir->Append(NS_LITERAL_STRING("browser"));
 
   mozilla::SetStrongPtr(appData.directory, static_cast<nsIFile*>(appSubdir.get()));
   greDir.forget(&appData.xreDirectory);
 
-  int result = XRE_main(argc, argv, &appData, 0);
+  int result = XRE_main(argc, argv, &appData);
   return result;
 }
--- a/toolkit/xre/nsAndroidStartup.cpp
+++ b/toolkit/xre/nsAndroidStartup.cpp
@@ -40,13 +40,13 @@ GeckoStart(JNIEnv* env, char** argv, int
     if (!argv) {
         LOG("Failed to get arguments for GeckoStart\n");
         return;
     }
 
     XREAppData appData;
     appData = aAppData;
 
-    int result = XRE_main(argc, argv, appData, 0);
+    int result = XRE_main(argc, argv, appData);
 
     if (result)
         LOG("XRE_main returned %d", result);
 }
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -4686,17 +4686,17 @@ XREMain::XRE_main(int argc, char* argv[]
 }
 
 void
 XRE_StopLateWriteChecks(void) {
   mozilla::StopLateWriteChecks();
 }
 
 int
-XRE_main(int argc, char* argv[], const XREAppData& aAppData, uint32_t aFlags)
+XRE_main(int argc, char* argv[], const XREAppData& aAppData)
 {
   XREMain main;
 
   int result = main.XRE_main(argc, argv, aAppData);
   mozilla::RecordShutdownEndTimeStamp();
   return result;
 }
 
--- a/xpcom/build/nsXULAppAPI.h
+++ b/xpcom/build/nsXULAppAPI.h
@@ -191,26 +191,23 @@
  * application.
  *
  * @param argc/argv Command-line parameters to pass to the application. On
  *                  Windows, these should be in UTF8. On unix-like platforms
  *                  these are in the "native" character set.
  *
  * @param aAppData  Information about the application to be run.
  *
- * @param aFlags    Platform specific flags.
- *
  * @return         A native result code suitable for returning from main().
  *
  * @note           If the binary is linked against the standalone XPCOM glue,
  *                 XPCOMGlueStartup() should be called before this method.
  */
 XRE_API(int,
-        XRE_main, (int argc, char* argv[], const mozilla::XREAppData& aAppData,
-                   uint32_t aFlags))
+        XRE_main, (int argc, char* argv[], const mozilla::XREAppData& aAppData))
 
 /**
  * Given a path relative to the current working directory (or an absolute
  * path), return an appropriate nsIFile object.
  *
  * @note Pass UTF8 strings on Windows... native charset on other platforms.
  */
 XRE_API(nsresult,