Bug 459776 - date formatter is unused
authorShawn Wilsher <sdwilsh@shawnwilsher.com>
Fri, 17 Oct 2008 06:12:52 -0400
changeset 20577 bfdcb1fbba182669a5047c7e638a20abdf4a4e49
parent 20576 435361c1ed7c68a3751d70995ba4f14128195576
child 20578 c8f530de3268d69976e03307ffe27c206bd2f955
push id2972
push usertmielczarek@mozilla.com
push dateFri, 17 Oct 2008 10:35:06 +0000
treeherdermozilla-central@f31b66fd4192 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs459776
milestone1.9.1b2pre
Bug 459776 - date formatter is unused This changeset removes a small part of code that places does in startup that is not used or needed. r=dietrich
toolkit/components/places/src/nsNavHistory.cpp
toolkit/components/places/src/nsNavHistory.h
--- a/toolkit/components/places/src/nsNavHistory.cpp
+++ b/toolkit/components/places/src/nsNavHistory.cpp
@@ -454,20 +454,16 @@ nsNavHistory::Init()
   nsCOMPtr<nsIStringBundleService> bundleService =
     do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
   rv = bundleService->CreateBundle(
       "chrome://places/locale/places.properties",
       getter_AddRefs(mBundle));
   NS_ENSURE_SUCCESS(rv, rv);
 
-  // date formatter
-  mDateFormatter = do_CreateInstance(NS_DATETIMEFORMAT_CONTRACTID, &rv);
-  NS_ENSURE_SUCCESS(rv, rv);
-
   // initialize idle timer
   InitializeIdleTimer();
 
   // recent events hash tables
   NS_ENSURE_TRUE(mRecentTyped.Init(128), NS_ERROR_OUT_OF_MEMORY);
   NS_ENSURE_TRUE(mRecentBookmark.Init(128), NS_ERROR_OUT_OF_MEMORY);
   NS_ENSURE_TRUE(mRecentRedirects.Init(128), NS_ERROR_OUT_OF_MEMORY);
 
--- a/toolkit/components/places/src/nsNavHistory.h
+++ b/toolkit/components/places/src/nsNavHistory.h
@@ -237,18 +237,16 @@ public:
 
   /**
    * These functions return non-owning references to the locale-specific
    * objects for places components.
    */
   nsIStringBundle* GetBundle()
     { return mBundle; }
   nsICollation* GetCollation();
-  nsIDateTimeFormat* GetDateFormatter()
-    { return mDateFormatter; }
   void GetStringFromName(const PRUnichar* aName, nsACString& aResult);
 
   // returns true if history has been disabled
   PRBool IsHistoryDisabled() { return mExpireDaysMax == 0; }
 
   // get the statement for selecting a history row by URL
   mozIStorageStatement* DBGetURLPageInfo() { return mDBGetURLPageInfo; }
 
@@ -606,17 +604,16 @@ protected:
 
   // effective tld service
   nsCOMPtr<nsIEffectiveTLDService> mTLDService;
   nsCOMPtr<nsIIDNService>          mIDNService;
 
   // localization
   nsCOMPtr<nsIStringBundle> mBundle;
   nsCOMPtr<nsICollation> mCollation;
-  nsCOMPtr<nsIDateTimeFormat> mDateFormatter;
 
   // annotation service : MAY BE NULL!
   //nsCOMPtr<mozIAnnotationService> mAnnotationService;
 
   // recent events
   typedef nsDataHashtable<nsCStringHashKey, PRInt64> RecentEventHash;
   RecentEventHash mRecentTyped;
   RecentEventHash mRecentBookmark;