From 7095d2917ea049348f8476e848bd7b97a6a9ebe4 Mon Sep 17 00:00:00 2001 From: Jeremy Poulin Date: Wed, 28 May 2014 17:40:17 -0700 Subject: [PATCH] Bug 1016615 - Make subresources inherit timestamps from their parent. r=hurley --- netwerk/base/src/Seer.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/netwerk/base/src/Seer.cpp b/netwerk/base/src/Seer.cpp index 273963dbcc71..2f780049bf27 100644 --- a/netwerk/base/src/Seer.cpp +++ b/netwerk/base/src/Seer.cpp @@ -1381,7 +1381,7 @@ Seer::TryPredict(QueryType queryType, const TopLevelInfo &info, PRTime now, nsAutoCString subresource; int baseConfidence, confidence; - // We use goto nextrow here instead of just failling, because we want + // We use goto nextrow here instead of just failing, because we want // to do some sort of prediction if at all possible. Of course, it's // probably unlikely that subsequent rows will succeed if one fails, but // it's worth a shot. @@ -1987,19 +1987,17 @@ Seer::LearnForSubresource(const UriInfo &targetURI, const UriInfo &sourceURI) hostInfo); } - PRTime now = PR_Now(); - if (haveResource) { - UpdateSubresource(QUERY_PAGE, resourceInfo, now); + UpdateSubresource(QUERY_PAGE, resourceInfo, pageInfo.lastLoad); } else if (havePage) { - AddSubresource(QUERY_PAGE, pageInfo.id, targetURI.spec, now); + AddSubresource(QUERY_PAGE, pageInfo.id, targetURI.spec, pageInfo.lastLoad); } // Can't add a subresource to a page we don't have in our db. if (haveHost) { - UpdateSubresource(QUERY_ORIGIN, hostInfo, now); + UpdateSubresource(QUERY_ORIGIN, hostInfo, originInfo.lastLoad); } else if (haveOrigin) { - AddSubresource(QUERY_ORIGIN, originInfo.id, targetURI.origin, now); + AddSubresource(QUERY_ORIGIN, originInfo.id, targetURI.origin, originInfo.lastLoad); } // Can't add a subhost to a host we don't have in our db }