Changeset 259017 in webkit


Ignore:
Timestamp:
Mar 25, 2020 4:05:41 PM (4 years ago)
Author:
zhifei_fang@apple.com
Message:

[Timeline] Fix the out of bound dot index
https://bugs.webkit.org/show_bug.cgi?id=209492

Reviewed by Jonathan Bedard.

  • resultsdbpy/resultsdbpy/view/static/library/js/components/TimelineComponents.js:

(Timeline.CanvasSeriesComponent):

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r259013 r259017  
     12020-03-25  Zhifei Fang  <zhifei_fang@apple.com>
     2
     3        [Timeline] Fix the out of bound dot index
     4        https://bugs.webkit.org/show_bug.cgi?id=209492
     5
     6        Reviewed by Jonathan Bedard.
     7
     8        * resultsdbpy/resultsdbpy/view/static/library/js/components/TimelineComponents.js:
     9        (Timeline.CanvasSeriesComponent):
     10
    1112020-03-25  Daniel Bates  <dabates@apple.com>
    212
  • trunk/Tools/resultsdbpy/resultsdbpy/view/static/library/js/components/TimelineComponents.js

    r251114 r259017  
    386386        if (endScalesIndex >= scales.length)
    387387            endScalesIndex = scales.length - 1;
    388         let currentDotIndex = startScalesIndex - (scales.length - dots.length);
    389         if (currentDotIndex < 0)
    390             currentDotIndex = 0;
    391         for (let i = currentDotIndex; i <= startScalesIndex; i++) {
     388        let currentDotIndex = 0;
     389        for (let i = currentDotIndex; i <= startScalesIndex && currentDotIndex < dots.length; i++) {
    392390            const compResult = comp(scales[startScalesIndex], getScale(dots[currentDotIndex]));
    393391            if (!reversed) {
Note: See TracChangeset for help on using the changeset viewer.