mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 09:18:42 +09:00
Bug 1322292 - Some fixes for the Performance API in workers - part 2 - Get rid of NowBaseTimeStamp()
https://hg.mozilla.org/mozilla-central/rev/301231f4165a
This commit is contained in:
parent
94ea4f222c
commit
c1d7159d0f
7 changed files with 11 additions and 40 deletions
|
|
@ -1146,15 +1146,14 @@ Event::TimeStampImpl() const
|
|||
return perf->GetDOMTiming()->TimeStampToDOMHighRes(mEvent->mTimeStamp);
|
||||
}
|
||||
|
||||
// For dedicated workers, we should make times relative to the navigation
|
||||
// start of the document that created the worker, which is the same as the
|
||||
// timebase for performance.now().
|
||||
// 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->NowBaseTimeStamp();
|
||||
mEvent->mTimeStamp - workerPrivate->CreationTimeStamp();
|
||||
return duration.ToMilliseconds();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue