[webkit-reviews] review granted: [Bug 101104] JSStringCreateWithCFString() Should create an 8 bit String if possible : [Attachment 172366] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 6 09:35:15 PST 2012


Darin Adler <darin at apple.com> has granted Michael Saboff <msaboff at apple.com>'s
request for review:
Bug 101104: JSStringCreateWithCFString() Should create an 8 bit String if
possible
https://bugs.webkit.org/show_bug.cgi?id=101104

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

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=172366&action=review


> Source/JavaScriptCore/API/JSStringRefCF.cpp:45
> +	   CFIndex usedBufLen;

How about a non-abbreviated version, usedBufferLength?

> Source/JavaScriptCore/API/JSStringRefCF.cpp:46
> +	   CFIndex convertedsize = CFStringGetBytes(string, CFRangeMake(0,
length), kCFStringEncodingISOLatin1, 0, false, lcharBuffer.data(), length,
&usedBufLen);

Typically we’d capitalize “size”.

> Source/JavaScriptCore/API/JSStringRefCF.cpp:47
> +	   if ((static_cast<size_t>(convertedsize) == length) &&
(static_cast<size_t>(usedBufLen) == length))

We normally wouldn’t use parentheses in an a == b && c == d expression.


More information about the webkit-reviews mailing list