Bug 673226 - Null timestamp usage in telemetry code; r=jduell.mcbugs

This commit is contained in:
Honza Bambas 2011-08-21 09:27:29 +01:00
parent 0b2b971e93
commit defd1da6aa

View File

@ -887,11 +887,6 @@ nsLoadGroup::TelemetryReportChannel(nsITimedChannel *aTimedChannel,
if (NS_FAILED(rv) || !timingEnabled)
return;
TimeStamp channelCreation;
rv = aTimedChannel->GetChannelCreation(&channelCreation);
if (NS_FAILED(rv))
return;
TimeStamp asyncOpen;
rv = aTimedChannel->GetAsyncOpen(&asyncOpen);
// We do not check !asyncOpen.IsNull() bellow, prevent ASSERTIONs this way
@ -972,7 +967,7 @@ nsLoadGroup::TelemetryReportChannel(nsITimedChannel *aTimedChannel,
Telemetry::HTTP_##prefix##_FIRST_SENT_TO_LAST_RECEIVED, \
HISTOGRAM_TIME_DELTA(requestStart, responseEnd)); \
\
if (cacheReadStart.IsNull()) { \
if (cacheReadStart.IsNull() && !responseStart.IsNull()) { \
Telemetry::Accumulate( \
Telemetry::HTTP_##prefix##_OPEN_TO_FIRST_RECEIVED, \
HISTOGRAM_TIME_DELTA(asyncOpen, responseStart)); \