[webkit-dev] SerializedScriptValue: signed vs unsigned char

Oliver Hunt oliver at apple.com
Wed Feb 6 18:41:02 PST 2013


On Feb 6, 2013, at 4:59 PM, Alec Flett <alecflett at chromium.org> wrote:

> On Wed, Feb 6, 2013 at 4:48 PM, Maciej Stachowiak <mjs at apple.com> wrote:
> 
> I think we should continue to use uint8_t instead of char as the primary way to represent a raw byte in WebKit. First, it's good to distinguish raw data from C strings at the type system level, and second, the unpredictable signedness of char is actively bad for byte-oriented processing. Another library making a different choice doesn't overcome these reasons.
> 
> To be fair, there hasn't been a convention in WebKit at all.  uint8_t was chosen for SerializedScriptValue roughly two months ago, with specific IndexedDB support in mind: https://bugs.webkit.org/show_bug.cgi?id=104354 - this usage is not widespread, and in fact the only consumer of this type is IndexedDB.

I don't know where you get this idea from -- SerializedScriptValue has always used uint8 buffers.  That IndexedDB used Strings and that _it_ changed to uint8 buffers is entirely irrelevant here.

--Oliver
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20130206/5c9e255d/attachment.html>


More information about the webkit-dev mailing list