RESOLVED FIXED Bug 194549
Web Inspector: Timeline.prototype.recordsInTimeRange uses a property most records do not have
https://bugs.webkit.org/show_bug.cgi?id=194549
Summary Web Inspector: Timeline.prototype.recordsInTimeRange uses a property most rec...
Joseph Pecoraro
Reported 2019-02-12 11:56:53 PST
Timeline.prototype.recordsInTimeRange uses a property most records do not have Change `record.timestamp` to `record.startTime`. • Not all records have a timestamp. They do have a startTime/endTime • Those that do, set the startTime/endTime to the timestamp value
Attachments
[PATCH] Proposed Fix (1.61 KB, patch)
2019-02-12 11:57 PST, Joseph Pecoraro
no flags
Joseph Pecoraro
Comment 1 2019-02-12 11:57:18 PST
Created attachment 361818 [details] [PATCH] Proposed Fix
Devin Rousso
Comment 2 2019-02-12 12:04:04 PST
Comment on attachment 361818 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=361818&action=review rs=me > Source/WebInspectorUI/UserInterface/Models/Timeline.js:99 > + let upperIndex = this._records.upperBound(endTime, (time, record) => time - record.startTime); Should this be `endTime`? If it's `startTime`, that means we'd include records that began in the range, but finished outside of the range. If it's `endTime`, then we'd exclude those records.
Joseph Pecoraro
Comment 3 2019-02-12 12:55:41 PST
Comment on attachment 361818 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=361818&action=review >> Source/WebInspectorUI/UserInterface/Models/Timeline.js:99 >> + let upperIndex = this._records.upperBound(endTime, (time, record) => time - record.startTime); > > Should this be `endTime`? If it's `startTime`, that means we'd include records that began in the range, but finished outside of the range. If it's `endTime`, then we'd exclude those records. I'd expect records that are even partially in the range. The lowerIndex could use `record.endTime`, but there is `includeRecordBeforeStart`.
WebKit Commit Bot
Comment 4 2019-02-12 13:22:02 PST
Comment on attachment 361818 [details] [PATCH] Proposed Fix Clearing flags on attachment: 361818 Committed r241315: <https://trac.webkit.org/changeset/241315>
WebKit Commit Bot
Comment 5 2019-02-12 13:22:03 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 6 2019-02-12 13:23:32 PST
Note You need to log in before you can comment on or make changes to this bug.