summaryrefslogtreecommitdiffstats
path: root/dom/console
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@gmail.com>2018-04-29 14:44:39 +0200
committerGitHub <noreply@github.com>2018-04-29 14:44:39 +0200
commit64aec5a353b4eb58e075c01b2d6d948aa142e6ff (patch)
treed1e865c31c0864837f47f2eb1c99edd3a011c5d8 /dom/console
parent6fe08dcf34417e825b7b9b6b33141a4a3b46ba24 (diff)
parent306db80410e802b0fe9a3b5273d4cf29586a1b17 (diff)
downloadUXP-64aec5a353b4eb58e075c01b2d6d948aa142e6ff.tar
UXP-64aec5a353b4eb58e075c01b2d6d948aa142e6ff.tar.gz
UXP-64aec5a353b4eb58e075c01b2d6d948aa142e6ff.tar.lz
UXP-64aec5a353b4eb58e075c01b2d6d948aa142e6ff.tar.xz
UXP-64aec5a353b4eb58e075c01b2d6d948aa142e6ff.zip
Merge pull request #294 from janekptacijarabaci/js_dom_performance-resource-timing_2
moebius#161: The Performance Resource Timing (make timestamps be relative to startTime)
Diffstat (limited to 'dom/console')
-rwxr-xr-xdom/console/Console.cpp5
-rw-r--r--dom/console/Console.h10
2 files changed, 5 insertions, 10 deletions
diff --git a/dom/console/Console.cpp b/dom/console/Console.cpp
index 79e3eadc5..ff5a92167 100755
--- a/dom/console/Console.cpp
+++ b/dom/console/Console.cpp
@@ -1336,10 +1336,7 @@ Console::MethodInternal(JSContext* aCx, MethodName aMethodName,
WorkerPrivate* workerPrivate = GetCurrentThreadWorkerPrivate();
MOZ_ASSERT(workerPrivate);
- TimeDuration duration =
- mozilla::TimeStamp::Now() - workerPrivate->NowBaseTimeStamp();
-
- monotonicTimer = TimerClamping::ReduceMsTimeValue(duration.ToMilliseconds());
+ monotonicTimer = workerPrivate->TimeStampToDOMHighRes(TimeStamp::Now());
}
}
diff --git a/dom/console/Console.h b/dom/console/Console.h
index b334d79f9..2f375c8eb 100644
--- a/dom/console/Console.h
+++ b/dom/console/Console.h
@@ -258,9 +258,8 @@ private:
// the max number of timers is reached.
// * aCx - the JSContext rooting aName.
// * aName - this is (should be) the name of the timer as JS::Value.
- // * aTimestamp - the monotonicTimer for this context (taken from
- // window->performance.now() or from Now() -
- // workerPrivate->NowBaseTimeStamp() in workers.
+ // * aTimestamp - the monotonicTimer for this context taken from
+ // performance.now().
// * aTimerLabel - This label will be populated with the aName converted to a
// string.
// * aTimerValue - the StartTimer value stored into (or taken from)
@@ -290,9 +289,8 @@ private:
// the aName timer doesn't exist in the mTimerRegistry.
// * aCx - the JSContext rooting aName.
// * aName - this is (should be) the name of the timer as JS::Value.
- // * aTimestamp - the monotonicTimer for this context (taken from
- // window->performance.now() or from Now() -
- // workerPrivate->NowBaseTimeStamp() in workers.
+ // * aTimestamp - the monotonicTimer for this context taken from
+ // performance.now().
// * aTimerLabel - This label will be populated with the aName converted to a
// string.
// * aTimerDuration - the difference between aTimestamp and when the timer