Commit 68a3c31b authored by andersca@apple.com's avatar andersca@apple.com

Replace __alignof with alignof.

Rubber-stamped by Beth Dakin.

* Platform/CoreIPC/ArgumentCoders.cpp:
(CoreIPC::::encode):
(CoreIPC::decodeStringText):
* Platform/CoreIPC/ArgumentCoders.h:
(CoreIPC::SimpleArgumentCoder::encode):
(CoreIPC::SimpleArgumentCoder::decode):
* Platform/CoreIPC/ArgumentDecoder.h:
(CoreIPC::ArgumentDecoder::bufferIsLargeEnoughToContain):
* WebProcess/WebPage/DecoderAdapter.cpp:
(WebKit::DecoderAdapter::decodeString):
* WebProcess/WebPage/EncoderAdapter.cpp:
(WebKit::EncoderAdapter::encodeString):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158944 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 7f6fd501
2013-11-08 Anders Carlsson <andersca@apple.com>
Replace __alignof with alignof.
Rubber-stamped by Beth Dakin.
* Platform/CoreIPC/ArgumentCoders.cpp:
(CoreIPC::::encode):
(CoreIPC::decodeStringText):
* Platform/CoreIPC/ArgumentCoders.h:
(CoreIPC::SimpleArgumentCoder::encode):
(CoreIPC::SimpleArgumentCoder::decode):
* Platform/CoreIPC/ArgumentDecoder.h:
(CoreIPC::ArgumentDecoder::bufferIsLargeEnoughToContain):
* WebProcess/WebPage/DecoderAdapter.cpp:
(WebKit::DecoderAdapter::decodeString):
* WebProcess/WebPage/EncoderAdapter.cpp:
(WebKit::EncoderAdapter::encodeString):
2013-11-08 Anders Carlsson <andersca@apple.com>
Add a way to get a WKWebProcessPlugInBrowserContextController from a handle
......
......@@ -102,9 +102,9 @@ void ArgumentCoder<String>::encode(ArgumentEncoder& encoder, const String& strin
encoder << length << is8Bit;
if (is8Bit)
encoder.encodeFixedLengthData(reinterpret_cast<const uint8_t*>(string.characters8()), length * sizeof(LChar), __alignof(LChar));
encoder.encodeFixedLengthData(reinterpret_cast<const uint8_t*>(string.characters8()), length * sizeof(LChar), alignof(LChar));
else
encoder.encodeFixedLengthData(reinterpret_cast<const uint8_t*>(string.characters16()), length * sizeof(UChar), __alignof(UChar));
encoder.encodeFixedLengthData(reinterpret_cast<const uint8_t*>(string.characters16()), length * sizeof(UChar), alignof(UChar));
}
template <typename CharacterType>
......@@ -118,7 +118,7 @@ static inline bool decodeStringText(ArgumentDecoder& decoder, uint32_t length, S
CharacterType* buffer;
String string = String::createUninitialized(length, buffer);
if (!decoder.decodeFixedLengthData(reinterpret_cast<uint8_t*>(buffer), length * sizeof(CharacterType), __alignof(CharacterType)))
if (!decoder.decodeFixedLengthData(reinterpret_cast<uint8_t*>(buffer), length * sizeof(CharacterType), alignof(CharacterType)))
return false;
result = string;
......
......@@ -39,12 +39,12 @@ namespace CoreIPC {
template<typename T> struct SimpleArgumentCoder {
static void encode(ArgumentEncoder& encoder, const T& t)
{
encoder.encodeFixedLengthData(reinterpret_cast<const uint8_t*>(&t), sizeof(T), __alignof(T));
encoder.encodeFixedLengthData(reinterpret_cast<const uint8_t*>(&t), sizeof(T), alignof(T));
}
static bool decode(ArgumentDecoder& decoder, T& t)
{
return decoder.decodeFixedLengthData(reinterpret_cast<uint8_t*>(&t), sizeof(T), __alignof(T));
return decoder.decodeFixedLengthData(reinterpret_cast<uint8_t*>(&t), sizeof(T), alignof(T));
}
};
......@@ -127,7 +127,7 @@ template<typename T> struct VectorArgumentCoder<true, T> {
static void encode(ArgumentEncoder& encoder, const Vector<T>& vector)
{
encoder << static_cast<uint64_t>(vector.size());
encoder.encodeFixedLengthData(reinterpret_cast<const uint8_t*>(vector.data()), vector.size() * sizeof(T), __alignof(T));
encoder.encodeFixedLengthData(reinterpret_cast<const uint8_t*>(vector.data()), vector.size() * sizeof(T), alignof(T));
}
static bool decode(ArgumentDecoder& decoder, Vector<T>& vector)
......@@ -147,7 +147,7 @@ template<typename T> struct VectorArgumentCoder<true, T> {
Vector<T> temp;
temp.resize(size);
decoder.decodeFixedLengthData(reinterpret_cast<uint8_t*>(temp.data()), size * sizeof(T), __alignof(T));
decoder.decodeFixedLengthData(reinterpret_cast<uint8_t*>(temp.data()), size * sizeof(T), alignof(T));
vector.swap(temp);
return true;
......
......@@ -79,7 +79,7 @@ public:
if (numElements > std::numeric_limits<size_t>::max() / sizeof(T))
return false;
return bufferIsLargeEnoughToContain(__alignof(T), numElements * sizeof(T));
return bufferIsLargeEnoughToContain(alignof(T), numElements * sizeof(T));
}
// Generic type decode function.
......
......@@ -126,7 +126,7 @@ bool DecoderAdapter::decodeString(String& value)
UChar* buffer;
String string = String::createUninitialized(length, buffer);
if (!m_decoder.decodeFixedLengthData(reinterpret_cast<uint8_t*>(buffer), length * sizeof(UChar), __alignof(UChar)))
if (!m_decoder.decodeFixedLengthData(reinterpret_cast<uint8_t*>(buffer), length * sizeof(UChar), alignof(UChar)))
return false;
value = string;
......
......@@ -108,7 +108,7 @@ void EncoderAdapter::encodeString(const String& value)
uint64_t lengthInBytes = length * sizeof(UChar);
m_encoder << lengthInBytes;
m_encoder.encodeFixedLengthData(reinterpret_cast<const uint8_t*>(value.characters()), length * sizeof(UChar), __alignof(UChar));
m_encoder.encodeFixedLengthData(reinterpret_cast<const uint8_t*>(value.characters()), length * sizeof(UChar), alignof(UChar));
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment