Changeset 93546 in webkit
- Timestamp:
- Aug 22, 2011 2:46:58 PM (13 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r93544 r93546 1 2011-08-21 Michael Saboff <msaboff@apple.com> 2 3 REGRESSION (r92231): Apple campus proposal PDF doesn't display in Safari 4 https://bugs.webkit.org/show_bug.cgi?id=66464 5 6 Changed ArgumentEncoder to use system malloc instead of fastMalloc. 7 FastMalloc uses madvise(MADV_FREE_REUSABLE) which is incompatible with 8 mach message Out Of Line (OOL) messages that use MACH_MSG_VIRTUAL_COPY. 9 The system malloc has no such limitation. 10 Changed sendOutgoingMessage to use MACH_MSG_VIRTUAL_COPY again as it 11 doesn't have size limitations that MACH_MSG_PHYSICAL_COPY. 12 13 Reviewed by Anders Carlsson. 14 15 * Platform/CoreIPC/ArgumentEncoder.cpp: 16 (CoreIPC::ArgumentEncoder::~ArgumentEncoder): 17 (CoreIPC::ArgumentEncoder::grow): 18 * Platform/CoreIPC/mac/ConnectionMac.cpp: 19 (CoreIPC::Connection::sendOutgoingMessage): 20 1 21 2011-08-22 Anders Carlsson <andersca@apple.com> 2 22 -
trunk/Source/WebKit2/Platform/CoreIPC/ArgumentEncoder.cpp
r89177 r93546 51 51 { 52 52 if (m_buffer) 53 f astFree(m_buffer);53 free(m_buffer); 54 54 #if !USE(UNIX_DOMAIN_SOCKETS) 55 55 // FIXME: We need to dispose of the attachments in cases of failure. … … 71 71 if (alignedSize + size > m_bufferCapacity) { 72 72 size_t newCapacity = std::max(alignedSize + size, std::max(static_cast<size_t>(32), m_bufferCapacity + m_bufferCapacity / 4 + 1)); 73 // Use system malloc / realloc instead of fastMalloc due to 74 // fastMalloc using MADV_FREE_REUSABLE doesn't work with 75 // mach messages with OOL message and MACH_MSG_VIRTUAL_COPY. 73 76 if (!m_buffer) 74 m_buffer = static_cast<uint8_t*>( fastMalloc(newCapacity));77 m_buffer = static_cast<uint8_t*>(malloc(newCapacity)); 75 78 else 76 m_buffer = static_cast<uint8_t*>( fastRealloc(m_buffer, newCapacity));79 m_buffer = static_cast<uint8_t*>(realloc(m_buffer, newCapacity)); 77 80 78 81 // FIXME: What should we do if allocating memory fails? -
trunk/Source/WebKit2/Platform/CoreIPC/mac/ConnectionMac.cpp
r92231 r93546 156 156 messageBodyIsOOL = true; 157 157 158 attachments.append(Attachment(arguments->buffer(), arguments->bufferSize(), MACH_MSG_ PHYSICAL_COPY, false));158 attachments.append(Attachment(arguments->buffer(), arguments->bufferSize(), MACH_MSG_VIRTUAL_COPY, false)); 159 159 numberOfOOLMemoryDescriptors++; 160 160 messageSize = machMessageSize(0, numberOfPortDescriptors, numberOfOOLMemoryDescriptors);
Note: See TracChangeset
for help on using the changeset viewer.