bug 981513 - revert 807441 r=sworkman
authorPatrick McManus <mcmanus@ducksong.com>
Sun, 09 Mar 2014 11:00:18 -0400
changeset 172845 74e38869788885ebcf48b7d5e2ca33cd1b63062d
parent 172844 88780b5a201eba8c7b9afdb14493be5535832521
child 172846 c2658ef0233635d9f376e02db6bfe2525b83dc86
push id26384
push userryanvm@gmail.com
push dateTue, 11 Mar 2014 19:19:48 +0000
treeherdermozilla-central@9cdaf3f7c601 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssworkman
bugs981513, 807441
milestone30.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 981513 - revert 807441 r=sworkman
netwerk/dns/nsHostResolver.cpp
--- a/netwerk/dns/nsHostResolver.cpp
+++ b/netwerk/dns/nsHostResolver.cpp
@@ -597,17 +597,17 @@ nsHostResolver::ResolveHost(const char  
             else if (!(flags & RES_BYPASS_CACHE) &&
                      he->rec->HasUsableResult(flags) &&
                      TimeStamp::NowLoRes() <= (he->rec->expiration + TimeDuration::FromSeconds(mGracePeriod * 60))) {
                 LOG(("  Using cached record for host [%s].\n", host));
                 // put reference to host record on stack...
                 result = he->rec;
                 Telemetry::Accumulate(Telemetry::DNS_LOOKUP_METHOD2, METHOD_HIT);
 
-                // For entries that are in the grace period with a failed connect,
+                // For entries that are in the grace period
                 // or all cached negative entries, use the cache but start a new
                 // lookup in the background
                 ConditionallyRefreshRecord(he->rec, host);
                 
                 if (he->rec->negative) {
                     LOG(("  Negative cache entry for[%s].\n", host));
                     Telemetry::Accumulate(Telemetry::DNS_LOOKUP_METHOD2,
                                           METHOD_NEGATIVE_HIT);
@@ -881,19 +881,18 @@ nsHostResolver::IssueLookup(nsHostRecord
           mPendingCount));
 
     return rv;
 }
 
 nsresult
 nsHostResolver::ConditionallyRefreshRecord(nsHostRecord *rec, const char *host)
 {
-    if ((((TimeStamp::NowLoRes() > rec->expiration) &&
-        rec->mBlacklistedItems.Length()) ||
-        rec->negative) && !rec->resolving) {
+    if (((TimeStamp::NowLoRes() > rec->expiration) || rec->negative) &&
+        !rec->resolving) {
         LOG(("  Using %s cache entry for host [%s] but starting async renewal.",
             rec->negative ? "negative" :"positive", host));
         IssueLookup(rec);
 
         if (!rec->negative) {
             // negative entries are constantly being refreshed, only
             // track positive grace period induced renewals
             Telemetry::Accumulate(Telemetry::DNS_LOOKUP_METHOD2,