Changeset 82682 in webkit


Ignore:
Timestamp:
Apr 1, 2011 8:17:08 AM (13 years ago)
Author:
Adam Roben
Message:

Retrieve revision numbers from the build's got_revision property in Leaks Viewer

Previously, we were getting the revision of the first revision that triggered a build.
Choosing the last revision would have been more accurate. But got_revision is what is used
everywhere else on build.webkit.org, and should work even when there were no changes that
triggered a build (e.g., if someone clicked the Force Build button).

Fixes <http://webkit.org/b/57630> Leaks viewer gets some revision numbers wrong in the
recent builds list

Reviewed by Anders Carlsson.

  • BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/RecentBuildsLoader.js:

(RecentBuildsLoader.prototype.start): Pull the revision number out of the got_revision
property, rather than out of the first (i.e., earliest) change in the sourceStamp object.

  • BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/Utilities.js:

(Array.prototype.first): Added this helper function to return the first element in an array
that matches the given predicate, or null if no such element exists.

Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/RecentBuildsLoader.js

    r81442 r82682  
    4040
    4141                var buildInfo = {
    42                     revision: build.sourceStamp.changes[0].rev,
     42                    revision: parseInt(build.properties.first(function(property) { return property[0] === "got_revision"; })[1], 10),
    4343                    leakCount: 0,
    4444                    url: null,
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/Utilities.js

    r81068 r82682  
    4141    return result;
    4242}
     43
     44Array.prototype.first = function(predicate) {
     45    for (var i = 0; i < this.length; ++i) {
     46        if (predicate(this[i]))
     47            return this[i];
     48    }
     49    return null;
     50}
  • trunk/Tools/ChangeLog

    r82681 r82682  
     12011-04-01  Adam Roben  <aroben@apple.com>
     2
     3        Retrieve revision numbers from the build's got_revision property in Leaks Viewer
     4
     5        Previously, we were getting the revision of the first revision that triggered a build.
     6        Choosing the last revision would have been more accurate. But got_revision is what is used
     7        everywhere else on build.webkit.org, and should work even when there were no changes that
     8        triggered a build (e.g., if someone clicked the Force Build button).
     9
     10        Fixes <http://webkit.org/b/57630> Leaks viewer gets some revision numbers wrong in the
     11        recent builds list
     12
     13        Reviewed by Anders Carlsson.
     14
     15        * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/RecentBuildsLoader.js:
     16        (RecentBuildsLoader.prototype.start): Pull the revision number out of the got_revision
     17        property, rather than out of the first (i.e., earliest) change in the sourceStamp object.
     18
     19        * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/Utilities.js:
     20        (Array.prototype.first): Added this helper function to return the first element in an array
     21        that matches the given predicate, or null if no such element exists.
     22
    1232011-03-31  Adam Roben  <aroben@apple.com>
    224
Note: See TracChangeset for help on using the changeset viewer.