[webkit-reviews] review granted: [Bug 118702] XSLStyleSheet::parseString shouldn't upconvert 8-bit string : [Attachment 206720] Fixes the bug

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 15 21:55:56 PDT 2013


Geoffrey Garen <ggaren at apple.com> has granted Ryosuke Niwa <rniwa at webkit.org>'s
request for review:
Bug 118702: XSLStyleSheet::parseString shouldn't upconvert 8-bit string
https://bugs.webkit.org/show_bug.cgi?id=118702

Attachment 206720: Fixes the bug
https://bugs.webkit.org/attachment.cgi?id=206720&action=review

------- Additional Comments from Geoffrey Garen <ggaren at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=206720&action=review


> Source/WebCore/xml/XSLStyleSheetLibxslt.cpp:153
> +    const bool is8Bit = string.is8Bit();
> +    const char* characters = is8Bit ? reinterpret_cast<const
char*>(string.characters8()) : reinterpret_cast<const
char*>(string.characters16());

We don't usually use const for local variables like this.

> Source/WebCore/xml/parser/XMLDocumentParser.h:226
> +    const unsigned char BOMHighByte = *reinterpret_cast<const unsigned
char*>(&BOM);

I know you didn't write this function, but it's very weird to call this value
the "high byte", since it might be the high or low byte depending on
endianness, and it's actually the low byte on 99% of computers these days.

I'd call this highOrLowByte.


More information about the webkit-reviews mailing list