diff options
Diffstat (limited to 'dom/performance/PerformanceTiming.h')
-rwxr-xr-x[-rw-r--r--] | dom/performance/PerformanceTiming.h | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/dom/performance/PerformanceTiming.h b/dom/performance/PerformanceTiming.h index aef54a258..fc7e7d5bd 100644..100755 --- a/dom/performance/PerformanceTiming.h +++ b/dom/performance/PerformanceTiming.h @@ -10,6 +10,7 @@ #include "mozilla/Attributes.h" #include "nsContentUtils.h" #include "nsDOMNavigationTiming.h" +#include "mozilla/TimerClamping.h" #include "nsWrapperCache.h" #include "Performance.h" @@ -68,10 +69,10 @@ public: * page), if the given TimeStamp is valid. Otherwise, it will return * the FetchStart timing value. */ - inline DOMHighResTimeStamp TimeStampToDOMHighResOrFetchStart(TimeStamp aStamp) + inline DOMHighResTimeStamp TimeStampToReducedDOMHighResOrFetchStart(TimeStamp aStamp) { return (!aStamp.IsNull()) - ? TimeStampToDOMHighRes(aStamp) + ? TimerClamping::ReduceMsTimeValue(TimeStampToDOMHighRes(aStamp)) : FetchStartHighRes(); } @@ -119,7 +120,7 @@ public: if (!nsContentUtils::IsPerformanceTimingEnabled()) { return 0; } - return GetDOMTiming()->GetNavigationStart(); + return TimerClamping::ReduceMsTimeValue(GetDOMTiming()->GetNavigationStart()); } DOMTimeMilliSec UnloadEventStart() @@ -127,7 +128,7 @@ public: if (!nsContentUtils::IsPerformanceTimingEnabled()) { return 0; } - return GetDOMTiming()->GetUnloadEventStart(); + return TimerClamping::ReduceMsTimeValue(GetDOMTiming()->GetUnloadEventStart()); } DOMTimeMilliSec UnloadEventEnd() @@ -135,7 +136,7 @@ public: if (!nsContentUtils::IsPerformanceTimingEnabled()) { return 0; } - return GetDOMTiming()->GetUnloadEventEnd(); + return TimerClamping::ReduceMsTimeValue(GetDOMTiming()->GetUnloadEventEnd()); } uint16_t GetRedirectCount() const; @@ -161,6 +162,7 @@ public: DOMHighResTimeStamp DomainLookupStartHighRes(); DOMHighResTimeStamp DomainLookupEndHighRes(); DOMHighResTimeStamp ConnectStartHighRes(); + DOMHighResTimeStamp SecureConnectionStartHighRes(); DOMHighResTimeStamp ConnectEndHighRes(); DOMHighResTimeStamp RequestStartHighRes(); DOMHighResTimeStamp ResponseStartHighRes(); @@ -173,6 +175,7 @@ public: DOMTimeMilliSec DomainLookupStart(); DOMTimeMilliSec DomainLookupEnd(); DOMTimeMilliSec ConnectStart(); + DOMTimeMilliSec SecureConnectionStart(); DOMTimeMilliSec ConnectEnd(); DOMTimeMilliSec RequestStart(); DOMTimeMilliSec ResponseStart(); @@ -183,7 +186,7 @@ public: if (!nsContentUtils::IsPerformanceTimingEnabled()) { return 0; } - return GetDOMTiming()->GetDomLoading(); + return TimerClamping::ReduceMsTimeValue(GetDOMTiming()->GetDomLoading()); } DOMTimeMilliSec DomInteractive() const @@ -191,7 +194,7 @@ public: if (!nsContentUtils::IsPerformanceTimingEnabled()) { return 0; } - return GetDOMTiming()->GetDomInteractive(); + return TimerClamping::ReduceMsTimeValue(GetDOMTiming()->GetDomInteractive()); } DOMTimeMilliSec DomContentLoadedEventStart() const @@ -199,7 +202,7 @@ public: if (!nsContentUtils::IsPerformanceTimingEnabled()) { return 0; } - return GetDOMTiming()->GetDomContentLoadedEventStart(); + return TimerClamping::ReduceMsTimeValue(GetDOMTiming()->GetDomContentLoadedEventStart()); } DOMTimeMilliSec DomContentLoadedEventEnd() const @@ -207,7 +210,7 @@ public: if (!nsContentUtils::IsPerformanceTimingEnabled()) { return 0; } - return GetDOMTiming()->GetDomContentLoadedEventEnd(); + return TimerClamping::ReduceMsTimeValue(GetDOMTiming()->GetDomContentLoadedEventEnd()); } DOMTimeMilliSec DomComplete() const @@ -215,7 +218,7 @@ public: if (!nsContentUtils::IsPerformanceTimingEnabled()) { return 0; } - return GetDOMTiming()->GetDomComplete(); + return TimerClamping::ReduceMsTimeValue(GetDOMTiming()->GetDomComplete()); } DOMTimeMilliSec LoadEventStart() const @@ -223,7 +226,7 @@ public: if (!nsContentUtils::IsPerformanceTimingEnabled()) { return 0; } - return GetDOMTiming()->GetLoadEventStart(); + return TimerClamping::ReduceMsTimeValue(GetDOMTiming()->GetLoadEventStart()); } DOMTimeMilliSec LoadEventEnd() const @@ -231,7 +234,7 @@ public: if (!nsContentUtils::IsPerformanceTimingEnabled()) { return 0; } - return GetDOMTiming()->GetLoadEventEnd(); + return TimerClamping::ReduceMsTimeValue(GetDOMTiming()->GetLoadEventEnd()); } private: @@ -255,6 +258,7 @@ private: TimeStamp mDomainLookupStart; TimeStamp mDomainLookupEnd; TimeStamp mConnectStart; + TimeStamp mSecureConnectionStart; TimeStamp mConnectEnd; TimeStamp mRequestStart; TimeStamp mResponseStart; @@ -270,6 +274,8 @@ private: // redirectEnd attributes. It is false if there were no redirects, or if // any of the responses didn't pass the timing-allow-check bool mReportCrossOriginRedirect; + + bool mSecureConnection; }; } // namespace dom |