Bug 1046342 - bring xpcshell's usage message a little closer to reality; r=bsmedberg
authorNathan Froyd <froydnj@mozilla.com>
Wed, 30 Jul 2014 16:29:16 -0400
changeset 198853 1163a780cb23591366133ed0b7246806c36f2fdd
parent 198852 a7e5662981a937da82e668dd295c8c56ccf7868c
child 198854 e13efa1149a1068a2d45c309403f2891c814d447
push id47509
push usernfroyd@mozilla.com
push dateMon, 11 Aug 2014 13:48:34 +0000
treeherdermozilla-inbound@1163a780cb23 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs1046342
milestone34.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 1046342 - bring xpcshell's usage message a little closer to reality; r=bsmedberg The -n, -j, and -P options appear to be no longer supported. I rearranged the options list so that the options appear in the order of processing in ProcessArgs. I also took the opportunity to move the -m' option out of the options claimed to be handled in ProcessArgsForCompartment, since it no longer is.
js/xpconnect/src/XPCShellImpl.cpp
--- a/js/xpconnect/src/XPCShellImpl.cpp
+++ b/js/xpconnect/src/XPCShellImpl.cpp
@@ -999,17 +999,17 @@ Process(JSContext *cx, JS::Handle<JSObje
     if (file != stdin)
         fclose(file);
 }
 
 static int
 usage(void)
 {
     fprintf(gErrFile, "%s\n", JS_GetImplementationVersion());
-    fprintf(gErrFile, "usage: xpcshell [-g gredir] [-a appdir] [-r manifest]... [-PsSwWCijmIn] [-v version] [-f scriptfile] [-e script] [scriptfile] [scriptarg...]\n");
+    fprintf(gErrFile, "usage: xpcshell [-g gredir] [-a appdir] [-r manifest]... [-WwxiCSsmIp] [-v version] [-f scriptfile] [-e script] [scriptfile] [scriptarg...]\n");
     return 2;
 }
 
 static void
 ProcessArgsForCompartment(JSContext *cx, char **argv, int argc)
 {
     for (int i = 0; i < argc; i++) {
         if (argv[i][0] != '-' || argv[i][1] == '\0')
@@ -1112,16 +1112,18 @@ ProcessArgs(JSContext *cx, JS::Handle<JS
         case 'w':
             reportWarnings = true;
             break;
         case 'x':
             break;
         case 'd':
             /* This used to try to turn on the debugger. */
             break;
+        case 'm':
+            break;
         case 'f':
             if (++i == argc) {
                 return usage();
             }
             Process(cx, obj, argv[i], false);
             /*
              * XXX: js -f foo.js should interpret foo.js and then
              * drop into interactive mode, but that breaks test
@@ -1146,17 +1148,16 @@ ProcessArgs(JSContext *cx, JS::Handle<JS
             break;
         }
         case 'C':
             compileOnly = true;
             isInteractive = false;
             break;
         case 'S':
         case 's':
-        case 'm':
         case 'I':
             // These options are processed in ProcessArgsForCompartment.
             break;
         case 'p':
         {
           // plugins path
           char *pluginPath = argv[++i];
           nsCOMPtr<nsIFile> pluginsDir;