Bug 1085407 - Make the timeline actor's 'memory' and 'ticks' events use the docshell absolute time instead of Date.now(), r=jsantell,ttromey

This commit is contained in:
Victor Porof 2014-10-20 14:22:56 -04:00
Родитель 85e3cfa6ad
Коммит 6bd1e17d62
1 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -138,20 +138,24 @@ let TimelineActor = exports.TimelineActor = protocol.ActorClass({
if (!this._isRecording) {
return;
}
if (!this.docShells.length) {
return;
}
let endTime = this.docShells[0].now();
let markers = [];
for (let docShell of this.docShells) {
markers = [...markers, ...docShell.popProfileTimelineMarkers()];
}
if (markers.length > 0) {
let endTime = this.docShells[0].now();
events.emit(this, "markers", markers, endTime);
}
if (this._memoryActor) {
events.emit(this, "memory", Date.now(), this._memoryActor.measure());
events.emit(this, "memory", endTime, this._memoryActor.measure());
}
if (this._framerateActor) {
events.emit(this, "ticks", Date.now(), this._framerateActor.getPendingTicks());
events.emit(this, "ticks", endTime, this._framerateActor.getPendingTicks());
}
this._dataPullTimeout = setTimeout(() => {