bug 981513 - revert 807441 r=sworkman a=dougt
authorPatrick McManus <mcmanus@ducksong.com>
Sun, 09 Mar 2014 11:00:18 -0400
changeset 183284 8dda3e9072e18eb857b0adb6732f5d5ae842dac5
parent 183283 6beaea69f93b67193771f4ecf6222c10b4e9dc2b
child 183285 09432c0c759fc7ecb66cd37362a8941e640cf060
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssworkman, dougt
bugs981513, 807441
milestone29.0a2
bug 981513 - revert 807441 r=sworkman a=dougt
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,