зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1403926 - Make the PerformanceNavigationTiming timestamps be relative to startTime r=baku
MozReview-Commit-ID: 7lvSsde9dzh --HG-- extra : rebase_source : bc4b7fa0526a3fe749c17ce10f70baa8a33f8bb1
This commit is contained in:
Родитель
3fba909015
Коммит
9b2d85e6e1
|
@ -314,7 +314,9 @@ PerformanceMainThread::EnsureDocEntry()
|
|||
{
|
||||
if (!mDocEntry && nsContentUtils::IsPerformanceNavigationTimingEnabled()) {
|
||||
nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(mChannel);
|
||||
mDocEntry = new PerformanceNavigationTiming(Timing(), this,
|
||||
RefPtr<PerformanceTiming> timing =
|
||||
new PerformanceTiming(this, mChannel, nullptr, 0);
|
||||
mDocEntry = new PerformanceNavigationTiming(timing, this,
|
||||
httpChannel);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,6 +24,10 @@ class PerformanceNavigationTiming final
|
|||
public:
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
// Note that aPerformanceTiming must be initalized with zeroTime = 0
|
||||
// so that timestamps are relative to startTime, as opposed to the
|
||||
// performance.timing object for which timestamps are absolute and has a
|
||||
// zeroTime initialized to navigationStart
|
||||
explicit PerformanceNavigationTiming(PerformanceTiming* aPerformanceTiming,
|
||||
Performance* aPerformance,
|
||||
nsIHttpChannel* aChannel)
|
||||
|
|
Загрузка…
Ссылка в новой задаче