Bug 661282 - Follow up: Bring back the original handling for not specifying --appomni; f=gbrown r=bsmedberg
authorBrad Lassey <blassey@mozilla.com>
Mon, 22 Aug 2011 09:00:34 +0100
changeset 75635 da3b0e3fadc792eb8c6355991429c68369c1e603
parent 75634 163bc0f5774788209945ab00cfd74faacf2291a3
child 75636 5378c0b9525a63a24a7798c29cdcae43255e21f1
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewersbsmedberg
bugs661282
milestone9.0a1
Bug 661282 - Follow up: Bring back the original handling for not specifying --appomni; f=gbrown r=bsmedberg
js/src/xpconnect/shell/xpcshell.cpp
--- a/js/src/xpconnect/shell/xpcshell.cpp
+++ b/js/src/xpconnect/shell/xpcshell.cpp
@@ -1832,17 +1832,19 @@ main(int argc, char **argv, char **envp)
         if (argc > 1 && !strcmp(argv[1], "--greomni")) {
             nsCOMPtr<nsILocalFile> greOmni;
             nsCOMPtr<nsILocalFile> appOmni;
             XRE_GetFileFromPath(argv[2], getter_AddRefs(greOmni));
             if (argc > 3 && !strcmp(argv[3], "--appomni")) {
                 XRE_GetFileFromPath(argv[4], getter_AddRefs(appOmni));
                 argc-=2;
                 argv+=2;
-            } 
+            } else {
+                appOmni = greOmni;
+            }
             
             XRE_InitOmnijar(greOmni, appOmni);
             argc-=2;
             argv+=2;
         }
 
         nsCOMPtr<nsIServiceManager> servMan;
         rv = NS_InitXPCOM2(getter_AddRefs(servMan), appDir, &dirprovider);