Bug 1016615 - Make subresources inherit timestamps from their parent. r=hurley

This commit is contained in:
Jeremy Poulin 2014-05-28 17:40:17 -07:00
parent c116a16494
commit 69719e3890

View File

@ -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
}