Bug 530385 - Replace PR_MIN/PR_MAX with NS_MIN/NS_MAX in toolkit/components/places, r=mak77
authorJae-Seong Lee-Russo <lusian@gmail.com>
Sun, 13 Dec 2009 09:32:10 -0800
changeset 35673 e89ef920772f51dcaa58a6c000882f2d4d3a51b1
parent 35672 a795d222898aacc84fcaf4b7e21f56b961669575
child 35674 479d37add351cc404c72dd7c908e85c1046b3ae6
push id10672
push userphilringnalda@gmail.com
push dateSun, 13 Dec 2009 17:32:43 +0000
treeherdermozilla-central@e89ef920772f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak77
bugs530385
milestone1.9.3a1pre
Bug 530385 - Replace PR_MIN/PR_MAX with NS_MIN/NS_MAX in toolkit/components/places, r=mak77
toolkit/components/places/src/nsFaviconService.cpp
toolkit/components/places/src/nsNavHistory.cpp
--- a/toolkit/components/places/src/nsFaviconService.cpp
+++ b/toolkit/components/places/src/nsFaviconService.cpp
@@ -1285,17 +1285,17 @@ FaviconLoadListener::OnStopRequest(nsIRe
     nsCOMPtr<nsISupports> cacheToken;
     rv = cachingChannel->GetCacheToken(getter_AddRefs(cacheToken));
     if (NS_SUCCEEDED(rv)) {
       nsCOMPtr<nsICacheEntryInfo> cacheEntry(do_QueryInterface(cacheToken));
       PRUint32 seconds;
       rv = cacheEntry->GetExpirationTime(&seconds);
       if (NS_SUCCEEDED(rv)) {
         // Set the expiration, but make sure we honor our cap.
-        expiration = PR_Now() + PR_MIN(seconds * PR_USEC_PER_SEC,
+        expiration = PR_Now() + NS_MIN((PRTime)seconds * PR_USEC_PER_SEC,
                                        MAX_FAVICON_EXPIRATION);
       }
     }
   }
   // If we did not obtain a time from the cache, or it was negative, use our cap
   if (expiration < 0)
     expiration = PR_Now() + MAX_FAVICON_EXPIRATION;
 
--- a/toolkit/components/places/src/nsNavHistory.cpp
+++ b/toolkit/components/places/src/nsNavHistory.cpp
@@ -181,17 +181,17 @@ using namespace mozilla::places;
 #define DEFAULT_JOURNAL_MODE "TRUNCATE"
 
 // These macros are used when splitting history by date.
 // These are the day containers and catch-all final container.
 #define ADDITIONAL_DATE_CONT_NUM 3
 // We use a guess of the number of months considering all of them 30 days
 // long, but we split only the last 6 months.
 #define DATE_CONT_NUM(_expireDays) \
-  (ADDITIONAL_DATE_CONT_NUM + PR_MIN(6, (_expireDays/30)))
+  (ADDITIONAL_DATE_CONT_NUM + NS_MIN(6, (_expireDays/30)))
 
 // fraction of free pages in the database to force a vacuum between
 // MAX_TIME_BEFORE_VACUUM and MIN_TIME_BEFORE_VACUUM.
 #define VACUUM_FREEPAGES_THRESHOLD 0.1
 // This is the maximum time (in microseconds) that can pass between 2 VACUUM
 // operations.
 #define MAX_TIME_BEFORE_VACUUM (PRInt64)60 * 24 * 60 * 60 * 1000 * 1000
 // This is the minimum time (in microseconds) that should pass between 2 VACUUM