[webkit-reviews] review denied: [Bug 73799] Update String::containsOnlyASCII() to handle 8 bits strings : [Attachment 117845] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 5 10:40:02 PST 2011


Sam Weinig <sam at webkit.org> has denied Benjamin Poulain <benjamin at webkit.org>'s
request for review:
Bug 73799: Update String::containsOnlyASCII() to handle 8 bits strings
https://bugs.webkit.org/show_bug.cgi?id=73799

Attachment 117845: Patch
https://bugs.webkit.org/attachment.cgi?id=117845&action=review

------- Additional Comments from Sam Weinig <sam at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=117845&action=review


> Source/JavaScriptCore/wtf/text/WTFString.h:504
> +    if (is8Bit()) {
> +	   const LChar* characters = characters8();
> +	   LChar ored = 0;
> +	   for (size_t i = 0; i < m_impl->length(); ++i)
> +	       ored |= characters[i];
> +	   return !(ored & 0x80);
> +    }

It would probably make sense to add a charactersAreAllASCII that takes LChars,
to match the one that takes UChars, and call it here.


More information about the webkit-reviews mailing list