Title: [274737] trunk/Source/WebInspectorUI
- Revision
- 274737
- Author
- [email protected]
- Date
- 2021-03-19 14:20:02 -0700 (Fri, 19 Mar 2021)
Log Message
Uncaught Exception: RangeError: Array size is not a small enough positive integer.
https://bugs.webkit.org/show_bug.cgi?id=223532
<rdar://problem/75635080>
Reviewed by Devin Rousso.
This patch fixes the broken CPU instrument when viewing a JSON timeline recordng.
This exception is thrown when viewing a timeline recording that has been
imported from JSON file. Aside from the exception, the code is functionally
broken in this situation since passing a negative number to Array() doesn't work.
I tested this change manually and selection ranges now behave as expected, and
have not regressed in other instruments / UI.
* UserInterface/Views/CPUTimelineView.js:
Based on my investigation, the visibleEndTime is incorrectly computed when
showing a JSON timeline recording because the currentTime property is always '0'.
If this is the case, then let's assume that the entire range should be displayed.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (274736 => 274737)
--- trunk/Source/WebInspectorUI/ChangeLog 2021-03-19 20:19:29 UTC (rev 274736)
+++ trunk/Source/WebInspectorUI/ChangeLog 2021-03-19 21:20:02 UTC (rev 274737)
@@ -1 +1,23 @@
+2021-03-19 BJ Burg <[email protected]>
+
+ Uncaught Exception: RangeError: Array size is not a small enough positive integer.
+ https://bugs.webkit.org/show_bug.cgi?id=223532
+ <rdar://problem/75635080>
+
+ Reviewed by Devin Rousso.
+
+ This patch fixes the broken CPU instrument when viewing a JSON timeline recordng.
+
+ This exception is thrown when viewing a timeline recording that has been
+ imported from JSON file. Aside from the exception, the code is functionally
+ broken in this situation since passing a negative number to Array() doesn't work.
+
+ I tested this change manually and selection ranges now behave as expected, and
+ have not regressed in other instruments / UI.
+
+ * UserInterface/Views/CPUTimelineView.js:
+ Based on my investigation, the visibleEndTime is incorrectly computed when
+ showing a JSON timeline recording because the currentTime property is always '0'.
+ If this is the case, then let's assume that the entire range should be displayed.
+
== Rolled over to ChangeLog-2021-03-18 ==
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CPUTimelineView.js (274736 => 274737)
--- trunk/Source/WebInspectorUI/UserInterface/Views/CPUTimelineView.js 2021-03-19 20:19:29 UTC (rev 274736)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CPUTimelineView.js 2021-03-19 21:20:02 UTC (rev 274737)
@@ -437,7 +437,9 @@
let graphStartTime = this.startTime;
let graphEndTime = this.endTime;
- let visibleEndTime = Math.min(this.endTime, this.currentTime);
+
+ // When viewing a timeline recording from JSON, this.currentTime is always 0.
+ let visibleEndTime = Math.min(this.endTime, this.currentTime) || this.endTime;
let visibleDuration = visibleEndTime - graphStartTime;
let discontinuities = this._recording.discontinuitiesInTimeRange(graphStartTime, visibleEndTime);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes