mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 15:28:39 +09:00
Bug 1323941 - navigationStart should not be exposed to workers as timing attribute
https://hg.mozilla.org/mozilla-central/rev/6be7eb833b11
This commit is contained in:
parent
dbccb9748a
commit
fdcf9f71e5
8 changed files with 71 additions and 40 deletions
|
|
@ -31,29 +31,6 @@ PerformanceWorker::Now() const
|
|||
return RoundTime(duration.ToMilliseconds());
|
||||
}
|
||||
|
||||
// To be removed once bug 1124165 lands
|
||||
bool
|
||||
PerformanceWorker::IsPerformanceTimingAttribute(const nsAString& aName)
|
||||
{
|
||||
// In workers we just support navigationStart.
|
||||
return aName.EqualsASCII("navigationStart");
|
||||
}
|
||||
|
||||
DOMHighResTimeStamp
|
||||
PerformanceWorker::GetPerformanceTimingFromString(const nsAString& aProperty)
|
||||
{
|
||||
if (!IsPerformanceTimingAttribute(aProperty)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (aProperty.EqualsLiteral("navigationStart")) {
|
||||
return mWorkerPrivate->NowBaseTime();
|
||||
}
|
||||
|
||||
MOZ_CRASH("IsPerformanceTimingAttribute and GetPerformanceTimingFromString are out of sync");
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
PerformanceWorker::InsertUserEntry(PerformanceEntry* aEntry)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue