зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1514752 Define hero user timing before performance entry is created r=rwood
1-line fix to hero element timing: the performance entry would show up as 'undefined' in profiles because the variable was defined later. Differential Revision: https://phabricator.services.mozilla.com/D14746 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
4f8c2372b0
Коммит
96ae71fa3f
|
@ -116,13 +116,13 @@ function measureHero() {
|
|||
// mark the time now as when hero element received
|
||||
perfData.mark(heroFound);
|
||||
console.log("found hero:" + heroFound);
|
||||
var resultType = "hero:" + heroFound;
|
||||
// calculcate result: performance.timing.fetchStart - time when we got hero element
|
||||
perfData.measure(name = resultType,
|
||||
startMark = startMeasure,
|
||||
endMark = heroFound);
|
||||
var perfResult = perfData.getEntriesByName(resultType);
|
||||
var _result = Math.round(perfResult[0].duration);
|
||||
var resultType = "hero:" + heroFound;
|
||||
sendResult(resultType, _result);
|
||||
perfData.clearMarks();
|
||||
perfData.clearMeasures();
|
||||
|
|
Загрузка…
Ссылка в новой задаче