Bug 56342

Summary: Leaks Viewer shows recent builds in a strange order
Product: WebKit Reporter: Adam Roben (:aroben) <aroben>
Component: New BugsAssignee: Adam Roben (:aroben) <aroben>
Status: RESOLVED FIXED    
Severity: Normal CC: ddkilzer, joepeck
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Attachments:
Description Flags
Patch darin: review+

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>