[webkit-reviews] review canceled: [Bug 87245] [EFL] Ewk_Intent does not expose WebCore::Intent::data() : [Attachment 143747] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 28 06:54:09 PDT 2012


Christophe Dumez <christophe.dumez at intel.com> has canceled Christophe Dumez
<christophe.dumez at intel.com>'s request for review:
Bug 87245: [EFL] Ewk_Intent does not expose WebCore::Intent::data()
https://bugs.webkit.org/show_bug.cgi?id=87245

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

------- Additional Comments from Christophe Dumez <christophe.dumez at intel.com>
After thinking a bit more about it, I went back to my initial proposal.

Note that WTF::String is used here purely has a container for our char buffer.
In the JSC case, this is a vector of unsigned char (or LChar), so a 8-Bit
buffer.
The JSC::SerializedScriptValue::toWireString() can only return a String that is
8-Bit (as per its implementation in the present patch). Only a String returned
from JSC::SerializedScriptValue::toWireString() can be passed to
JSC::SerializedScriptValue::createFromWire() and therefore the String passed as
argument as to be 8-Bit or it is invalid. I added ASSERTIONS to be safe.

I believe that calling WTF::String::utf8() in this case is wrong because it may
cause converting of the data stored in the buffer internally. We specifically
don't want the char buffer to be altered since WTF::String is used purely as a
container (which is slightly confusing but matching the V8 API). A binary image
might be stored in that buffer and converting to a different encoding will lead
to unexpected result.

For short, the "wire" String here is used merely as an exchange/storage format.
It is used in the following scenario in IndexedDB for example:
- Store output of serializedData.toWireString() to the database
- Read data (aka "wire string") back from database
- Construct back a SerializedScriptValue from the wire string using
SerializedScriptValue::createFromWire().


More information about the webkit-reviews mailing list