[webkit-reviews] review granted: [Bug 180365] Limit user agent versioning to an upper bound : [Attachment 328500] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 5 16:55:09 PST 2017


Joseph Pecoraro <joepeck at webkit.org> has granted Brent Fulgham
<bfulgham at webkit.org>'s request for review:
Bug 180365: Limit user agent versioning to an upper bound
https://bugs.webkit.org/show_bug.cgi?id=180365

Attachment 328500: Patch

https://bugs.webkit.org/attachment.cgi?id=328500&action=review




--- Comment #12 from Joseph Pecoraro <joepeck at webkit.org> ---
Comment on attachment 328500
  --> https://bugs.webkit.org/attachment.cgi?id=328500
Patch

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

r=me, but since neither of us are a WebKit Owner I suspect you'll need a nod
from one.

> LayoutTests/fast/dom/navigator-userAgent-frozen.html:34
> +    var versionComponents = version.split('.');
> +    if (versionComponents.length == 0) {

I don't think String.prototype.split can ever return an empty array, it would
always return at least 1 value (the original string). But you could compare
`length <= 1` and I think that would be fine for this test.


More information about the webkit-reviews mailing list