[webkit-reviews] review granted: [Bug 195317] Web Inspector: recordsInTimeRange sometimes does not get the expected record when includeRecordBeforeStart : [Attachment 363616] [PATCH] Proposed Fix

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 5 02:13:37 PST 2019


Devin Rousso <drousso at apple.com> has granted Joseph Pecoraro
<joepeck at webkit.org>'s request for review:
Bug 195317: Web Inspector: recordsInTimeRange sometimes does not get the
expected record when includeRecordBeforeStart
https://bugs.webkit.org/show_bug.cgi?id=195317

Attachment 363616: [PATCH] Proposed Fix

https://bugs.webkit.org/attachment.cgi?id=363616&action=review




--- Comment #2 from Devin Rousso <drousso at apple.com> ---
Comment on attachment 363616
  --> https://bugs.webkit.org/attachment.cgi?id=363616
[PATCH] Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=363616&action=review

r=me

> Source/WebInspectorUI/UserInterface/Models/Timeline.js:116
> +		   lowerIndex--;

You could make this into a do-while :)

> Source/WebInspectorUI/UserInterface/Models/Timeline.js:117
> +		   while (this._records[lowerIndex] !== recordBefore.parent)

Is it guaranteed that we'd eventually reach the parent record, or should we
also add `&& this._records[lowerIndex].type === recordBefore.parent.type` so
it's a bit more restrictive?


More information about the webkit-reviews mailing list