Bug 1192787 - Readd performance enabled test to ResponseEndHighRes; r=baku
authorKyle Machulis <kyle@nonpolynomial.com>
Mon, 10 Aug 2015 14:16:11 -0700
changeset 291589 059f102b3567aba630b95833c7f9f4c737f95a1f
parent 291588 462b7f77dc3af710ee3cbf3d68778e563a4ffc07
child 291590 44204bf72cbfda72113fe91e017fface0d029170
push id962
push userjlund@mozilla.com
push dateFri, 04 Dec 2015 23:28:54 +0000
treeherdermozilla-release@23a2d286e80f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1192787
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1192787 - Readd performance enabled test to ResponseEndHighRes; r=baku
dom/base/nsPerformance.cpp
--- a/dom/base/nsPerformance.cpp
+++ b/dom/base/nsPerformance.cpp
@@ -343,17 +343,17 @@ DOMTimeMilliSec
 nsPerformanceTiming::ResponseStart()
 {
   return static_cast<int64_t>(ResponseStartHighRes());
 }
 
 DOMHighResTimeStamp
 nsPerformanceTiming::ResponseEndHighRes()
 {
-  if (!IsInitialized()) {
+  if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized()) {
     return mZeroTime;
   }
   if (mResponseEnd.IsNull() ||
      (!mCacheReadEnd.IsNull() && mCacheReadEnd < mResponseEnd)) {
     mResponseEnd = mCacheReadEnd;
   }
   // Bug 1155008 - nsHttpTransaction is racy. Return ResponseStart when null
   return mResponseEnd.IsNull() ? ResponseStartHighRes()