Bug 56342 - Leaks Viewer shows recent builds in a strange order
Summary: Leaks Viewer shows recent builds in a strange order
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Adam Roben (:aroben)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-14 16:02 PDT by Adam Roben (:aroben)
Modified: 2011-03-14 16:18 PDT (History)
2 users (show)

See Also:


Attachments
Patch (2.03 KB, patch)
2011-03-14 16:04 PDT, Adam Roben (:aroben)
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Roben (:aroben) 2011-03-14 16:02:50 PDT
Leaks Viewer shows recent builds in a strange order
Comment 1 Adam Roben (:aroben) 2011-03-14 16:04:51 PDT
Created attachment 85735 [details]
Patch
Comment 2 Joseph Pecoraro 2011-03-14 16:14:50 PDT
Comment on attachment 85735 [details]
Patch

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

> Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/RecentBuildsLoader.js:80
> +                if (a.revision < b.revision)
> +                    return 1;
> +                if (b.revision < a.revision)
> +                    return -1;
> +                return 0;

How about: return a.revision - b.revision;
Comment 3 Joseph Pecoraro 2011-03-14 16:15:29 PDT
> > Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/RecentBuildsLoader.js:80
> > +                if (a.revision < b.revision)
> > +                    return 1;
> > +                if (b.revision < a.revision)
> > +                    return -1;
> > +                return 0;
> 
> How about: return a.revision - b.revision;

Re-reading that I think I have a and b reversed.
Comment 4 Adam Roben (:aroben) 2011-03-14 16:17:52 PDT
Darin and I independently came up with the same suggestion. I've fixed it. Thanks!
Comment 5 Adam Roben (:aroben) 2011-03-14 16:18:12 PDT
Committed r81075: <http://trac.webkit.org/changeset/81075>