mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 08:48:39 +09:00
Bug 1322292 - Some fixes for the Performance API in workers - part 3 - TimeStampToDOMHighRes() in workerPrivate
https://hg.mozilla.org/mozilla-central/rev/b827e4d0dc73
This commit is contained in:
parent
c1d7159d0f
commit
e537f5888d
3 changed files with 9 additions and 9 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue