Title: [158955] trunk/Source/WebKit2
- Revision
- 158955
- Author
- [email protected]
- Date
- 2013-11-08 14:04:43 -0800 (Fri, 08 Nov 2013)
Log Message
Remove a workaround for a bug in malloc on Symbian
https://bugs.webkit.org/show_bug.cgi?id=124069
Reviewed by Sam Weinig.
* Platform/CoreIPC/ArgumentDecoder.cpp:
(CoreIPC::ArgumentDecoder::~ArgumentDecoder):
(CoreIPC::ArgumentDecoder::initialize):
* Platform/CoreIPC/ArgumentDecoder.h:
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (158954 => 158955)
--- trunk/Source/WebKit2/ChangeLog 2013-11-08 22:01:33 UTC (rev 158954)
+++ trunk/Source/WebKit2/ChangeLog 2013-11-08 22:04:43 UTC (rev 158955)
@@ -1,5 +1,17 @@
2013-11-08 Anders Carlsson <[email protected]>
+ Remove a workaround for a bug in malloc on Symbian
+ https://bugs.webkit.org/show_bug.cgi?id=124069
+
+ Reviewed by Sam Weinig.
+
+ * Platform/CoreIPC/ArgumentDecoder.cpp:
+ (CoreIPC::ArgumentDecoder::~ArgumentDecoder):
+ (CoreIPC::ArgumentDecoder::initialize):
+ * Platform/CoreIPC/ArgumentDecoder.h:
+
+2013-11-08 Anders Carlsson <[email protected]>
+
More build fixes.
* UIProcess/API/mac/WKBrowsingContextController.mm:
Modified: trunk/Source/WebKit2/Platform/CoreIPC/ArgumentDecoder.cpp (158954 => 158955)
--- trunk/Source/WebKit2/Platform/CoreIPC/ArgumentDecoder.cpp 2013-11-08 22:01:33 UTC (rev 158954)
+++ trunk/Source/WebKit2/Platform/CoreIPC/ArgumentDecoder.cpp 2013-11-08 22:04:43 UTC (rev 158955)
@@ -45,8 +45,8 @@
ArgumentDecoder::~ArgumentDecoder()
{
- ASSERT(m_allocatedBase);
- free(m_allocatedBase);
+ ASSERT(m_buffer);
+ free(m_buffer);
#if !USE(UNIX_DOMAIN_SOCKETS)
// FIXME: We need to dispose of the mach ports in cases of failure.
#else
@@ -67,12 +67,10 @@
void ArgumentDecoder::initialize(const uint8_t* buffer, size_t bufferSize)
{
- // This is the largest primitive type we expect to unpack from the message.
- const size_t expectedAlignment = sizeof(uint64_t);
- m_allocatedBase = static_cast<uint8_t*>(malloc(bufferSize + expectedAlignment));
- m_buffer = roundUpToAlignment(m_allocatedBase, expectedAlignment);
- ASSERT(!(reinterpret_cast<uintptr_t>(m_buffer) % expectedAlignment));
+ m_buffer = static_cast<uint8_t*>(malloc(bufferSize));
+ ASSERT(!(reinterpret_cast<uintptr_t>(m_buffer) % alignof(uint64_t)));
+
m_bufferPos = m_buffer;
m_bufferEnd = m_buffer + bufferSize;
memcpy(m_buffer, buffer, bufferSize);
Modified: trunk/Source/WebKit2/Platform/CoreIPC/ArgumentDecoder.h (158954 => 158955)
--- trunk/Source/WebKit2/Platform/CoreIPC/ArgumentDecoder.h 2013-11-08 22:01:33 UTC (rev 158954)
+++ trunk/Source/WebKit2/Platform/CoreIPC/ArgumentDecoder.h 2013-11-08 22:04:43 UTC (rev 158955)
@@ -99,7 +99,6 @@
bool bufferIsLargeEnoughToContain(unsigned alignment, size_t size) const;
private:
- uint8_t* m_allocatedBase;
uint8_t* m_buffer;
uint8_t* m_bufferPos;
uint8_t* m_bufferEnd;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes