mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 22:38:41 +09:00
moebius#158: The Performance Resource Timing (added support for "workerStart")
https://github.com/MoonchildProductions/moebius/pull/158
This commit is contained in:
parent
6a97ee9379
commit
6885700c5b
26 changed files with 746 additions and 70 deletions
|
|
@ -42,8 +42,22 @@ PerformanceResourceTiming::~PerformanceResourceTiming()
|
|||
DOMHighResTimeStamp
|
||||
PerformanceResourceTiming::StartTime() const
|
||||
{
|
||||
DOMHighResTimeStamp startTime = mTiming->RedirectStartHighRes();
|
||||
return startTime ? startTime : mTiming->FetchStartHighRes();
|
||||
// Force the start time to be the earliest of:
|
||||
// - RedirectStart
|
||||
// - WorkerStart
|
||||
// - AsyncOpen
|
||||
// Ignore zero values. The RedirectStart and WorkerStart values
|
||||
// can come from earlier redirected channels prior to the AsyncOpen
|
||||
// time being recorded.
|
||||
DOMHighResTimeStamp redirect = mTiming->RedirectStartHighRes();
|
||||
redirect = redirect ? redirect : DBL_MAX;
|
||||
|
||||
DOMHighResTimeStamp worker = mTiming->WorkerStartHighRes();
|
||||
worker = worker ? worker : DBL_MAX;
|
||||
|
||||
DOMHighResTimeStamp asyncOpen = mTiming->AsyncOpenHighRes();
|
||||
|
||||
return std::min(asyncOpen, std::min(redirect, worker));
|
||||
}
|
||||
|
||||
JSObject*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue