Add functions for encoding/decoding data with a known size and alignment
Created attachment 97166 [details] Patch
Comment on attachment 97166 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=97166&action=review > Source/WebKit2/Platform/CoreIPC/ArgumentDecoder.cpp:110 > + memcpy(data, m_bufferPos, size); I don’t get it. Don’t you need to call roundUpToAlignment on m_bufferPos? Or just call alignBufferPosition instead? Don’t you need to do m_bufferPos += size?
(In reply to comment #2) > (From update of attachment 97166 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=97166&action=review > > > Source/WebKit2/Platform/CoreIPC/ArgumentDecoder.cpp:110 > > + memcpy(data, m_bufferPos, size); > > I don’t get it. > > Don’t you need to call roundUpToAlignment on m_bufferPos? Or just call alignBufferPosition instead? > Yeah, bufferIsLargeEnoughToContain should be alignBufferPosition. > Don’t you need to do m_bufferPos += size? Yes. New patch coming up.
Created attachment 97167 [details] Patch
Committed r88853: <http://trac.webkit.org/changeset/88853>