[webkit-reviews] review granted: [Bug 180537] YARR: Coalesce constructed character classes : [Attachment 328716] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 8 09:30:03 PST 2017


JF Bastien <jfbastien at apple.com> has granted Michael Saboff
<msaboff at apple.com>'s request for review:
Bug 180537: YARR: Coalesce constructed character classes
https://bugs.webkit.org/show_bug.cgi?id=180537

Attachment 328716: Patch

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




--- Comment #4 from JF Bastien <jfbastien at apple.com> ---
Comment on attachment 328716
  --> https://bugs.webkit.org/attachment.cgi?id=328716
Patch

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

I'm not an expert in this code, but looks fine overall. Minor comments.

> Source/JavaScriptCore/yarr/YarrPattern.cpp:286
> +		       if (pos + index > 0 && matches[pos + index - 1] == ch -
1) {

pos and index are both unsigned, so this is just checking that it's non-zero?
Or was the intent to capture wraparound as well?

> Source/JavaScriptCore/yarr/YarrPattern.cpp:358
> +	   // each iteration of the loop we will either remove something from
the list, or break the loop.

Break the loop, or just break out of it?

> Source/JavaScriptCore/yarr/YarrPattern.cpp:407
> +	       && m_rangesUnicode[0].begin == 0x80 && m_rangesUnicode[0].end ==
0x10ffff)

I don't get the Unicode range comparison. That's the general non-ASCII range,
can the user specify invalid codepoint ranges?

Or put another way, when it this range *not* the Unicode range?


More information about the webkit-reviews mailing list