From 08234250ba0fab2e00dcff10a189958b47939268 Mon Sep 17 00:00:00 2001 From: Jordan Santell Date: Thu, 28 May 2015 13:59:12 -0700 Subject: [PATCH] Bug 1169411 - recording durations should be based off of profiler's end time in a performance recording. r=vp --- .../devtools/performance/modules/logic/recording-model.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/browser/devtools/performance/modules/logic/recording-model.js b/browser/devtools/performance/modules/logic/recording-model.js index 67e2a719ad7..4c15dbb2530 100644 --- a/browser/devtools/performance/modules/logic/recording-model.js +++ b/browser/devtools/performance/modules/logic/recording-model.js @@ -133,8 +133,11 @@ RecordingModel.prototype = { * Sets results available from stopping a recording from SharedPerformanceConnection. * Should only be called by SharedPerformanceConnection. */ - _onStopRecording: Task.async(function *(info) { - this._profile = info.profile; + _onStopRecording: Task.async(function *({ profilerEndTime, profile }) { + // Update the duration with the accurate profilerEndTime, so we don't have + // samples outside of the approximate duration set in `_onStoppingRecording`. + this._duration = profilerEndTime - this._profilerStartTime; + this._profile = profile; this._completed = true; // We filter out all samples that fall out of current profile's range