RESOLVED FIXED 95811
WebKit2 IPC always sends strings using 16 bit data format
https://bugs.webkit.org/show_bug.cgi?id=95811
Summary WebKit2 IPC always sends strings using 16 bit data format
Michael Saboff
Reported 2012-09-04 18:29:33 PDT
Strings are sent using 16 bit data format even if the underlying string is an 8 bit string.
Attachments
Patch (3.25 KB, patch)
2012-09-05 15:58 PDT, Michael Saboff
no flags
Patch with ChangeLog tab removed (3.25 KB, patch)
2012-09-05 16:06 PDT, Michael Saboff
benjamin: review+
benjamin: commit-queue-
Michael Saboff
Comment 1 2012-09-05 15:58:00 PDT
WebKit Review Bot
Comment 2 2012-09-05 16:00:13 PDT
Attachment 162356 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit2/ChangeLog', u'Source/WebKit..." exit_code: 1 Source/WebKit2/ChangeLog:9: Line contains tab character. [whitespace/tab] [5] Total errors found: 1 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Michael Saboff
Comment 3 2012-09-05 16:06:15 PDT
Created attachment 162359 [details] Patch with ChangeLog tab removed
Benjamin Poulain
Comment 4 2012-09-05 21:42:24 PDT
Comment on attachment 162359 [details] Patch with ChangeLog tab removed View in context: https://bugs.webkit.org/attachment.cgi?id=162359&action=review Woot! Very nice. > Source/WebKit2/Platform/CoreIPC/ArgumentCoders.cpp:105 > + encoder->encodeFixedLengthData(reinterpret_cast<const uint8_t*>(string.characters()), length * sizeof(UChar), __alignof(UChar)); This should be characters16(). String::characters() is the "weak" version.
Michael Saboff
Comment 5 2012-09-06 08:42:21 PDT
(In reply to comment #4) > (From update of attachment 162359 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=162359&action=review > > Woot! Very nice. > > > Source/WebKit2/Platform/CoreIPC/ArgumentCoders.cpp:105 > > + encoder->encodeFixedLengthData(reinterpret_cast<const uint8_t*>(string.characters()), length * sizeof(UChar), __alignof(UChar)); > > This should be characters16(). > String::characters() is the "weak" version. You're right. The isNull() makes the is8Bit(), characters8() and characters16() accesses all safe. Thanks for the review, I'll land manually.
Michael Saboff
Comment 6 2012-09-06 10:14:04 PDT
Note You need to log in before you can comment on or make changes to this bug.