Changeset 161109 in webkit
- Timestamp:
- Dec 28, 2013 12:36:24 AM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r161108 r161109 1 2013-12-28 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK] Downloads are broken with the network process enabled 4 https://bugs.webkit.org/show_bug.cgi?id=126131 5 6 Reviewed by Martin Robinson. 7 8 The problem is that the network process crashes when trying to 9 convert the handle to a download, because at that point the 10 download has finished and the handle is NULL. This happens because 11 we are not implementing ResourceHandle::continueDidReceiveResponse(). 12 13 * platform/network/soup/ResourceHandleSoup.cpp: 14 (WebCore::nextMultipartResponsePartCallback): Call 15 continueAfterDidReceiveResponse() when not using async callbacks. 16 (WebCore::sendRequestCallback): Ditto. 17 (WebCore::continueAfterDidReceiveResponse): Helper function that 18 continues the load after didReceiveResponse. 19 (WebCore::ResourceHandle::continueDidReceiveResponse): Call 20 continueAfterDidReceiveResponse(). 21 1 22 2013-12-27 Daniel Bates <dabates@apple.com> 2 23 -
trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp
r160961 r161109 237 237 static int milisecondsSinceRequest(double requestTime); 238 238 #endif 239 static void continueAfterDidReceiveResponse(ResourceHandle*); 239 240 240 241 static bool gIgnoreSSLErrors = false; … … 653 654 d->m_response.updateFromSoupMessageHeaders(soup_multipart_input_stream_get_headers(d->m_multipartInputStream.get())); 654 655 656 d->m_previousPosition = 0; 657 655 658 if (handle->client()->usesAsyncCallbacks()) 656 659 handle->client()->didReceiveResponseAsync(handle.get(), d->m_response); 657 else 660 else { 658 661 handle->client()->didReceiveResponse(handle.get(), d->m_response); 659 660 if (handle->cancelledOrClientless()) { 661 cleanupSoupRequestOperation(handle.get()); 662 return; 663 } 664 665 d->m_previousPosition = 0; 666 667 handle->ensureReadBuffer(); 668 g_input_stream_read_async(d->m_inputStream.get(), const_cast<char*>(d->m_soupBuffer->data), d->m_soupBuffer->length, 669 G_PRIORITY_DEFAULT, d->m_cancellable.get(), readCallback, handle.get()); 662 continueAfterDidReceiveResponse(handle.get()); 663 } 670 664 } 671 665 … … 723 717 } 724 718 719 if (soupMessage && d->m_response.isMultipart()) 720 d->m_multipartInputStream = adoptGRef(soup_multipart_input_stream_new(soupMessage, inputStream.get())); 721 else 722 d->m_inputStream = inputStream; 723 725 724 if (d->client()->usesAsyncCallbacks()) 726 725 handle->client()->didReceiveResponseAsync(handle.get(), d->m_response); 727 else 726 else { 728 727 handle->client()->didReceiveResponse(handle.get(), d->m_response); 729 728 continueAfterDidReceiveResponse(handle.get()); 729 } 730 } 731 732 static void continueAfterDidReceiveResponse(ResourceHandle* handle) 733 { 730 734 if (handle->cancelledOrClientless()) { 731 cleanupSoupRequestOperation(handle .get());732 return; 733 } 734 735 if (soupMessage && d->m_response.isMultipart()) {736 d->m_multipartInputStream = adoptGRef(soup_multipart_input_stream_new(soupMessage, inputStream.get()));735 cleanupSoupRequestOperation(handle); 736 return; 737 } 738 739 ResourceHandleInternal* d = handle->getInternal(); 740 if (d->m_soupMessage && d->m_multipartInputStream && !d->m_inputStream) { 737 741 soup_multipart_input_stream_next_part_async(d->m_multipartInputStream.get(), G_PRIORITY_DEFAULT, 738 d->m_cancellable.get(), nextMultipartResponsePartCallback, handle.get()); 739 return; 740 } 741 742 d->m_inputStream = inputStream; 743 742 d->m_cancellable.get(), nextMultipartResponsePartCallback, handle); 743 return; 744 } 745 746 ASSERT(d->m_inputStream); 744 747 handle->ensureReadBuffer(); 745 748 g_input_stream_read_async(d->m_inputStream.get(), const_cast<char*>(d->m_soupBuffer->data), d->m_soupBuffer->length, 746 G_PRIORITY_DEFAULT, d->m_cancellable.get(), readCallback, handle .get());749 G_PRIORITY_DEFAULT, d->m_cancellable.get(), readCallback, handle); 747 750 } 748 751 … … 1391 1394 ASSERT(client()); 1392 1395 ASSERT(client()->usesAsyncCallbacks()); 1393 // FIXME: Implement this method if needed: https://bugs.webkit.org/show_bug.cgi?id=126114.1396 continueAfterDidReceiveResponse(this); 1394 1397 } 1395 1398
Note: See TracChangeset
for help on using the changeset viewer.