Bug 181160: Drop unused variables to stop assertions. r=dveditz, a=bzbarsky.
authordtownsend@oxymoronical.com
Tue, 25 Sep 2007 02:03:47 -0700
changeset 6290 d84c4af7fd66cf6914ed22fe60fb66d6f9bf58a4
parent 6289 9b00e586ae704cdcb9c73578b0d225d415a27497
child 6291 371885425f2b5c06090d097dc627bc1ab0c5dda5
push idunknown
push userunknown
push dateunknown
reviewersdveditz, bzbarsky
bugs181160
milestone1.9a9pre
Bug 181160: Drop unused variables to stop assertions. r=dveditz, a=bzbarsky.
xpinstall/src/nsInstall.cpp
xpinstall/src/nsInstall.h
xpinstall/src/nsSoftwareUpdate.cpp
--- a/xpinstall/src/nsInstall.cpp
+++ b/xpinstall/src/nsInstall.cpp
@@ -192,40 +192,33 @@ nsInstallInfo::nsInstallInfo(PRUint32   
     nsCOMPtr<nsIThread> thread = do_GetMainThread();
 
     NS_WITH_ALWAYS_PROXIED_SERVICE(CHROMEREG_IFACE, cr,
                                    NS_CHROMEREGISTRY_CONTRACTID,
                                    thread, &rv);
     if (NS_SUCCEEDED(rv)) {
       mChromeRegistry = cr;
 
+#ifndef MOZ_XUL_APP
       nsCAutoString spec;
       rv = NS_GetURLSpecFromFile(aFile, spec);
       if (NS_SUCCEEDED(rv)) {
         spec.Insert(NS_LITERAL_CSTRING("jar:"), 0);
         spec.AppendLiteral("!/");
-#ifdef MOZ_XUL_APP
-        NS_NewURI(getter_AddRefs(mFileJARURL), spec);
-#else
         mFileJARSpec.Assign(spec);
+      }
 #endif
-      }
     }
 
 #ifdef MOZ_XUL_APP
     NS_WITH_ALWAYS_PROXIED_SERVICE(nsIExtensionManager, em,
                                    "@mozilla.org/extensions/manager;1",
                                    thread, &rv);
     if (NS_SUCCEEDED(rv))
       mExtensionManager = em;
-
-    nsCOMPtr<nsIFile> manifest;
-    rv = NS_GetSpecialDirectory(NS_APP_CHROME_DIR, getter_AddRefs(manifest));
-    if (NS_SUCCEEDED(rv))
-      NS_NewFileURI(getter_AddRefs(mManifestURL), manifest);
 #endif
 }
 
 
 nsInstallInfo::~nsInstallInfo()
 {
   MOZ_COUNT_DTOR(nsInstallInfo);
 }
--- a/xpinstall/src/nsInstall.h
+++ b/xpinstall/src/nsInstall.h
@@ -109,18 +109,16 @@ class nsInstallInfo
     const PRUnichar*    GetArguments()          { return mArgs.get(); }
     PRUint32            GetFlags()              { return mFlags; }
     PRUint32            GetType()               { return mType; }
     nsIXPIListener*     GetListener()           { return mListener.get(); }
     CHROMEREG_IFACE*    GetChromeRegistry()     { return mChromeRegistry; }
 
 #ifdef MOZ_XUL_APP
     nsIExtensionManager* GetExtensionManager()  { return mExtensionManager; }
-    nsIURI*              GetFileJARURL()        { return mFileJARURL; }
-    nsIURI*              GetManifestURL()       { return mManifestURL; }
 #else
     const nsCString&     GetFileJARSpec()       { return mFileJARSpec; }
 #endif
 
     nsCOMPtr<nsIPrincipal>      mPrincipal;
 
   private:
 
@@ -131,18 +129,16 @@ class nsInstallInfo
     nsString   mURL;
     nsString   mArgs;
 
     nsCOMPtr<nsIFile>           mFile;
     nsCOMPtr<nsIXPIListener>    mListener;
     nsCOMPtr<CHROMEREG_IFACE>   mChromeRegistry;
 
 #ifdef MOZ_XUL_APP
-    nsCOMPtr<nsIURI>              mFileJARURL;
-    nsCOMPtr<nsIURI>              mManifestURL;
     nsCOMPtr<nsIExtensionManager> mExtensionManager;
 #else
     nsCString                     mFileJARSpec;
 #endif
 };
 
 #if defined(XP_WIN) || defined(XP_OS2)
 #define FILESEP '\\'
--- a/xpinstall/src/nsSoftwareUpdate.cpp
+++ b/xpinstall/src/nsSoftwareUpdate.cpp
@@ -332,19 +332,17 @@ nsSoftwareUpdate::InstallChrome( PRUint3
                                              nsnull,
                                              (PRUint32)aSelect,
                                              aListener);
     if (!info)
         return NS_ERROR_OUT_OF_MEMORY;
 
     if (!info->GetChromeRegistry() ||
 #ifdef MOZ_XUL_APP
-        !info->GetExtensionManager() ||
-        !info->GetFileJARURL() ||
-        !info->GetManifestURL()
+        !info->GetExtensionManager()
 #else
         info->GetFileJARSpec().IsEmpty()
 #endif
         ) {
       delete info;
       return NS_ERROR_FAILURE;
     }