Changeset 141562 in webkit
- Timestamp:
- Feb 1, 2013 2:06:06 AM (11 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r141546 r141562 1 2013-02-01 Gwang Yoon Hwang <ryumiel@company100.net> 2 3 [EFL][WK2] MiniBrowser segfaults on loading google.com 4 https://bugs.webkit.org/show_bug.cgi?id=108597 5 6 Reviewed by Andreas Kling. 7 8 * Platform/CoreIPC/unix/ConnectionUnix.cpp: 9 (CoreIPC::Connection::processMessage): 10 oolMessageBody should be properly initialized before it is used. 11 12 This patch also adds omitted break statement. 13 1 14 2013-01-31 Jae Hyun Park <jae.park@company100.net> 2 15 -
trunk/Source/WebKit2/Platform/CoreIPC/unix/ConnectionUnix.cpp
r141528 r141562 223 223 if (!attachmentInfo[i].isNull()) 224 224 attachmentFileDescriptorCount++; 225 break; 225 226 case Attachment::Uninitialized: 226 227 default: … … 238 239 RefPtr<WebKit::SharedMemory> oolMessageBody; 239 240 240 if (attachmentCount) { 241 size_t fdIndex = 0; 242 for (size_t i = 0; i < attachmentCount; ++i) { 243 int fd = -1; 244 switch (attachmentInfo[i].getType()) { 245 case Attachment::MappedMemoryType: 246 if (!attachmentInfo[i].isNull()) 247 fd = m_fileDescriptors[fdIndex++]; 248 attachments[attachmentCount - i - 1] = Attachment(fd, attachmentInfo[i].getSize()); 249 break; 250 case Attachment::SocketType: 251 if (!attachmentInfo[i].isNull()) 252 fd = m_fileDescriptors[fdIndex++]; 253 attachments[attachmentCount - i - 1] = Attachment(fd); 254 break; 255 case Attachment::Uninitialized: 256 attachments[attachmentCount - i - 1] = Attachment(); 257 default: 258 break; 259 } 260 } 261 262 if (messageInfo.isMessageBodyIsOutOfLine()) { 263 ASSERT(messageInfo.bodySize()); 264 265 if (attachmentInfo[attachmentCount].isNull()) { 266 ASSERT_NOT_REACHED(); 267 return false; 268 } 269 270 WebKit::SharedMemory::Handle handle; 271 handle.adoptFromAttachment(m_fileDescriptors[attachmentFileDescriptorCount - 1], attachmentInfo[attachmentCount].getSize()); 272 273 oolMessageBody = WebKit::SharedMemory::create(handle, WebKit::SharedMemory::ReadOnly); 274 if (!oolMessageBody) { 275 ASSERT_NOT_REACHED(); 276 return false; 277 } 278 } 279 } 280 281 ASSERT(attachments.size() == messageInfo.isMessageBodyIsOutOfLine() ? messageInfo.attachmentCount() - 1 : messageInfo.attachmentCount()); 241 size_t fdIndex = 0; 242 for (size_t i = 0; i < attachmentCount; ++i) { 243 int fd = -1; 244 switch (attachmentInfo[i].getType()) { 245 case Attachment::MappedMemoryType: 246 if (!attachmentInfo[i].isNull()) 247 fd = m_fileDescriptors[fdIndex++]; 248 attachments[attachmentCount - i - 1] = Attachment(fd, attachmentInfo[i].getSize()); 249 break; 250 case Attachment::SocketType: 251 if (!attachmentInfo[i].isNull()) 252 fd = m_fileDescriptors[fdIndex++]; 253 attachments[attachmentCount - i - 1] = Attachment(fd); 254 break; 255 case Attachment::Uninitialized: 256 attachments[attachmentCount - i - 1] = Attachment(); 257 default: 258 break; 259 } 260 } 261 262 if (messageInfo.isMessageBodyIsOutOfLine()) { 263 ASSERT(messageInfo.bodySize()); 264 265 if (attachmentInfo[attachmentCount].isNull()) { 266 ASSERT_NOT_REACHED(); 267 return false; 268 } 269 270 WebKit::SharedMemory::Handle handle; 271 handle.adoptFromAttachment(m_fileDescriptors[attachmentFileDescriptorCount - 1], attachmentInfo[attachmentCount].getSize()); 272 273 oolMessageBody = WebKit::SharedMemory::create(handle, WebKit::SharedMemory::ReadOnly); 274 if (!oolMessageBody) { 275 ASSERT_NOT_REACHED(); 276 return false; 277 } 278 } 279 280 ASSERT(attachments.size() == (messageInfo.isMessageBodyIsOutOfLine() ? messageInfo.attachmentCount() - 1 : messageInfo.attachmentCount())); 282 281 283 282 uint8_t* messageBody = messageData;
Note: See TracChangeset
for help on using the changeset viewer.