Uncaught Exception in Web Inspector. Steps to Reproduce: 1. Timelines Tab > Start Recording 2. Export / Save Recording 3. Load saved recording 4. Select CPU instrument => uncaught exception Uncaught Exceptions: ----------------------- - RangeError: Array size is not a small enough positive integer. (at CPUTimelineView.js:1274:32) _computeStatisticsData @ CPUTimelineView.js:1274:32 layout @ CPUTimelineView.js:459:59 _layoutSubtree @ View.js:293:20 updateLayout @ View.js:159:28 showTimelineViewForTimeline @ TimelineRecordingContentView.js:153:37 _timelineSelected @ TimelineRecordingContentView.js:799:45 dispatch @ Object.js:129:35 dispatchEventToListeners @ Object.js:137:17 _timelinesTreeSelectionDidChange @ TimelineOverview.js:896:38 dispatch @ Object.js:129:35 dispatchEventToListeners @ Object.js:137:17 _dispatchSelectionDidChangeEvent @ TreeOutline.js:1083:38 selectionControllerSelectionDidChange @ TreeOutline.js:755:46 _updateSelectedItems @ SelectionController.js:458:65 selectItem @ SelectionController.js:155:34 handleItemMouseDown @ SelectionController.js:322:28 _handleMouseDown @ TreeOutline.js:1067:54 _handleMouseDown @ [native code] ----------------------- Notes: Inspected URL: favorites:// Loading completed: true Frontend User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko)
Relevant code: let millisecondStartTime = Math.round(startTime * 1000); let millisecondEndTime = Math.round(endTime * 1000); let millisecondDuration = millisecondEndTime - millisecondStartTime; let samples = new Array(millisecondDuration); For some reason `endTime` is 0 here, so the overall duration is negative and the Array constructor throws.
<rdar://problem/75635080>
Created attachment 423776 [details] Patch v1.0
Comment on attachment 423776 [details] Patch v1.0 rs=me
Committed r274737 (235555@main): <https://commits.webkit.org/235555@main>