Bug 1123920 - ConnectStart and ConnectEnd should call DomainLookupEndHighRes if null. r=ehsan, a=lmandel
authorValentin Gosu <valentin.gosu@gmail.com>
Wed, 25 Feb 2015 20:23:46 +0200
changeset 257655 64032a38ad65db4488822bf641bf66c55d776596
parent 257654 2e1a4ce4eed81f7d7c3a3bda888e65ce9211a7ef
child 257656 12ef28874ba51f620d33e39f8618acb7686b6f2a
push id4610
push userjlund@mozilla.com
push dateMon, 30 Mar 2015 18:32:55 +0000
treeherdermozilla-beta@4df54044d9ef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan, lmandel
bugs1123920
milestone38.0a2
Bug 1123920 - ConnectStart and ConnectEnd should call DomainLookupEndHighRes if null. r=ehsan, a=lmandel
dom/base/nsPerformance.cpp
--- a/dom/base/nsPerformance.cpp
+++ b/dom/base/nsPerformance.cpp
@@ -270,32 +270,34 @@ nsPerformanceTiming::DomainLookupEnd()
 }
 
 DOMHighResTimeStamp
 nsPerformanceTiming::ConnectStartHighRes()
 {
   if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized()) {
     return mZeroTime;
   }
-  return TimeStampToDOMHighResOrFetchStart(mConnectStart);
+  return mConnectStart.IsNull() ? DomainLookupEndHighRes()
+                                : TimeStampToDOMHighRes(mConnectStart);
 }
 
 DOMTimeMilliSec
 nsPerformanceTiming::ConnectStart()
 {
   return static_cast<int64_t>(ConnectStartHighRes());
 }
 
 DOMHighResTimeStamp
 nsPerformanceTiming::ConnectEndHighRes()
 {
   if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized()) {
     return mZeroTime;
   }
-  return TimeStampToDOMHighResOrFetchStart(mConnectEnd);
+  return mConnectEnd.IsNull() ? DomainLookupEndHighRes()
+                              : TimeStampToDOMHighRes(mConnectEnd);
 }
 
 DOMTimeMilliSec
 nsPerformanceTiming::ConnectEnd()
 {
   return static_cast<int64_t>(ConnectEndHighRes());
 }