<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:dbates&#64;webkit.org" title="Daniel Bates &lt;dbates&#64;webkit.org&gt;"> <span class="fn">Daniel Bates</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Refactor BuildbotQueueView.revisionContentForIteration to work more generically with repositories other than &quot;openSource&quot; and &quot;internal&quot;."
   href="https://bugs.webkit.org/show_bug.cgi?id=147796">bug 147796</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Attachment #258537 Flags</td>
           <td>review?, commit-queue?
           </td>
           <td>review-, commit-queue-
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Refactor BuildbotQueueView.revisionContentForIteration to work more generically with repositories other than &quot;openSource&quot; and &quot;internal&quot;."
   href="https://bugs.webkit.org/show_bug.cgi?id=147796#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Refactor BuildbotQueueView.revisionContentForIteration to work more generically with repositories other than &quot;openSource&quot; and &quot;internal&quot;."
   href="https://bugs.webkit.org/show_bug.cgi?id=147796">bug 147796</a>
              from <span class="vcard"><a class="email" href="mailto:dbates&#64;webkit.org" title="Daniel Bates &lt;dbates&#64;webkit.org&gt;"> <span class="fn">Daniel Bates</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=258537&amp;action=diff" name="attach_258537" title="Patch">attachment 258537</a> <a href="attachment.cgi?id=258537&amp;action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=258537&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=258537&amp;action=review</a>

<span class="quote">&gt; Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:276
&gt; +        var shouldAddPlusSign = false;
&gt; +        var sortedRepositories = Dashboard.sortedRepositories;
&gt; +        for (var i = 0; i &lt; sortedRepositories.length; ++i) {
&gt; +            var repository = sortedRepositories[i];
&gt; +            var content = this._revisionContentWithPopoverForIteration(iteration,
&gt; +                previousDisplayedIteration, repository);
&gt; +            if (content) {
&gt; +                if (shouldAddPlusSign)
&gt; +                    fragment.appendChild(document.createTextNode(&quot; \uff0b &quot;));
&gt; +                fragment.appendChild(content);
&gt; +                shouldAddPlusSign = true;
&gt; +            }
&gt; +        }</span >

This change does not look correct. We are neither passing an instance of the Trac object to _revisionContentWithPopoverForIteration() nor are we passing the name of the repository to _revisionContentWithPopoverForIteration().

Assuming we store a reference to the Trac object in the repository object such that you can access it via sortedRepositories[i].trac for some i in [0, Dashboard.sortedRepositories.length], then I would write this as:

var sortedRepositories = Dashboard.sortedRepositories;
var fragment = document.createDocumentFragment();
fragment.appendChild(this._revisionContentWithPopoverForIteration(iteration, previousDisplayedIteration, sortedRepositories[0].name, sortedRepositories[0].trac));
for (var i = 1; i &lt; sortedRepositories.length; ++i) {
    fragment.appendChild(document.createTextNode(&quot; \uff0b &quot;));
    fragment.appendChild(this._revisionContentWithPopoverForIteration(iteration, previousDisplayedIteration, sortedRepositories[i].name, sortedRepositories[0].trac));
}
console.assert(fragment.childNodes.length);</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>