summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdom/performance/PerformanceTiming.cpp8
-rwxr-xr-xdom/tests/browser/browser_performanceAPI.js1
2 files changed, 3 insertions, 6 deletions
diff --git a/dom/performance/PerformanceTiming.cpp b/dom/performance/PerformanceTiming.cpp
index 97bbcb0ca..5f771f0aa 100755
--- a/dom/performance/PerformanceTiming.cpp
+++ b/dom/performance/PerformanceTiming.cpp
@@ -307,12 +307,8 @@ PerformanceTiming::SecureConnectionStartHighRes()
if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized()) {
return mZeroTime;
}
-
- // Round down to the nearest 1ms
- const double maxResolutionMs = 1;
- return mSecureConnectionStart.IsNull()
- ? mZeroTime
- : floor(TimeStampToDOMHighRes(mSecureConnectionStart) / maxResolutionMs) * maxResolutionMs;
+ return mSecureConnectionStart.IsNull() ? mZeroTime
+ : TimerClamping::ReduceMsTimeValue(TimeStampToDOMHighRes(mSecureConnectionStart));
}
DOMTimeMilliSec
diff --git a/dom/tests/browser/browser_performanceAPI.js b/dom/tests/browser/browser_performanceAPI.js
index 2c28fe3d1..0705fec49 100755
--- a/dom/tests/browser/browser_performanceAPI.js
+++ b/dom/tests/browser/browser_performanceAPI.js
@@ -17,6 +17,7 @@ const PERFORMANCE_TIMINGS = [
"domainLookupEnd",
"connectStart",
"connectEnd",
+ "secureConnectionStart",
"requestStart",
"responseStart",
"responseEnd",