Bug 392808 - 'Remove bogus assertion from nsXULStub ("Parsed app directory?") and stop leaking appData->directory'. r=bsmedberg. a=xulrunner-only
authorbent.mozilla@gmail.com
Thu, 30 Aug 2007 15:04:08 -0700
changeset 5483 024322952dffdb1746d767e35ea961ab08464769
parent 5482 3059b2fd8282a974cb61e347d586f80f376b6987
child 5484 8907a6a3b63aa31a407190efc778498ada636f29
push idunknown
push userunknown
push dateunknown
reviewersbsmedberg, xulrunner-only
bugs392808
milestone1.9a8pre
Bug 392808 - 'Remove bogus assertion from nsXULStub ("Parsed app directory?") and stop leaking appData->directory'. r=bsmedberg. a=xulrunner-only
xulrunner/stub/nsXULStub.cpp
--- a/xulrunner/stub/nsXULStub.cpp
+++ b/xulrunner/stub/nsXULStub.cpp
@@ -325,23 +325,17 @@ main(int argc, char **argv)
     }
 
     AutoAppData appData(iniFile);
     if (!appData) {
       Output(PR_TRUE, "Error: couldn't parse application.ini.\n");
       return 1;
     }
 
-    NS_ASSERTION(!appData->directory, "Parsed app directory?");
-
-    // chop "application.ini" off the path again
-    lastSlash = strrchr(iniPath, PATH_SEPARATOR_CHAR);
-    *lastSlash = '\0';
-    NS_NewNativeLocalFile(nsDependentCString(iniPath), PR_FALSE,
-                          &appData->directory);
+    NS_ASSERTION(appData->directory, "Failed to get app directory.");
 
     if (!appData->xreDirectory) {
       // chop "libxul.so" off the GRE path
       lastSlash = strrchr(greDir, PATH_SEPARATOR_CHAR);
       if (lastSlash) {
         *lastSlash = '\0';
       }
       NS_NewNativeLocalFile(nsDependentCString(greDir), PR_FALSE,