[Webkit-unassigned] [Bug 167524] Add support for Trac instances that host multiple projects.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jan 28 16:36:30 PST 2017


https://bugs.webkit.org/show_bug.cgi?id=167524

Alexey Proskuryakov <ap at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #299953|review?                     |review+, commit-queue-
              Flags|                            |

--- Comment #2 from Alexey Proskuryakov <ap at webkit.org> ---
Comment on attachment 299953
  --> https://bugs.webkit.org/attachment.cgi?id=299953
Patch

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

> Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Trac.js:120
> -        console.assert(fromDate <= toDate);
> +        if (fromDate > toDate)
> +            throw RangeError("Parameter fromDate should be before or on toDate.");

Why this change? This is logically an assertion, so it's cleaner to express it as such.

Just like in C/C++, adding a unit test that violates an assertion is not worth it.

> Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Trac.js:131
> +            "&from=" + encodeURIComponent(toDay.toISOString().slice(0, 10)) +
> +            "&daysback=" + encodeURIComponent((toDay - fromDay) / 1000 / 60 / 60 / 24);

Why add encodeURIComponent here if it's not needed?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170129/557925ed/attachment-0001.html>


More information about the webkit-unassigned mailing list