summaryrefslogtreecommitdiffstats
path: root/dom/events/Event.cpp
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-29 12:35:55 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-29 12:35:55 +0200
commiteeaf0a73acf661662b9baf9929c9688c60d0bf38 (patch)
treeef7ef4082282eb967220c1493c07084c97cfc7c0 /dom/events/Event.cpp
parent089a0bd9a4dace03e5800878055b86854eee5002 (diff)
downloadUXP-eeaf0a73acf661662b9baf9929c9688c60d0bf38.tar
UXP-eeaf0a73acf661662b9baf9929c9688c60d0bf38.tar.gz
UXP-eeaf0a73acf661662b9baf9929c9688c60d0bf38.tar.lz
UXP-eeaf0a73acf661662b9baf9929c9688c60d0bf38.tar.xz
UXP-eeaf0a73acf661662b9baf9929c9688c60d0bf38.zip
Bug 1322292 - Some fixes for the Performance API in workers - part 3 - TimeStampToDOMHighRes() in workerPrivate
https://hg.mozilla.org/mozilla-central/rev/b827e4d0dc73
Diffstat (limited to 'dom/events/Event.cpp')
-rwxr-xr-xdom/events/Event.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/dom/events/Event.cpp b/dom/events/Event.cpp
index 4e39675da..4b9776c0a 100755
--- a/dom/events/Event.cpp
+++ b/dom/events/Event.cpp
@@ -1146,15 +1146,11 @@ Event::TimeStampImpl() const
return perf->GetDOMTiming()->TimeStampToDOMHighRes(mEvent->mTimeStamp);
}
- // For dedicated workers, we should make times relative to the creation time
- // of the worker, which is the same as the timebase for performance.now().
workers::WorkerPrivate* workerPrivate =
workers::GetCurrentThreadWorkerPrivate();
MOZ_ASSERT(workerPrivate);
- TimeDuration duration =
- mEvent->mTimeStamp - workerPrivate->CreationTimeStamp();
- return duration.ToMilliseconds();
+ return workerPrivate->TimeStampToDOMHighRes(mEvent->mTimeStamp);
}
bool