Changeset 140338 in webkit
- Timestamp:
- Jan 21, 2013 8:23:13 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r140335 r140338 1 2013-01-21 Dan Winship <danw@gnome.org> 2 3 [Soup] Work around a glib bug 4 https://bugs.webkit.org/show_bug.cgi?id=106789 5 6 Reviewed by Martin Robinson. 7 8 In glib <= 2.35.4, g_input_stream_skip_async() applied to a 9 libsoup response stream will do a synchronous skip() in another 10 thread, which libsoup isn't expecting and doesn't have proper 11 locking for. Work around this until the next time we bump the glib 12 requirement by using read_async() (and throwing away the result) 13 instead of skip_async(). 14 15 No new tests; fixes a race condition in existing tests with older 16 glib 17 18 * platform/network/soup/ResourceHandleSoup.cpp: 19 (WebCore::redirectSkipCallback): 20 (WebCore::sendRequestCallback): 21 1 22 2013-01-18 Andrey Kosyakov <caseq@chromium.org> 2 23 -
trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp
r140154 r140338 514 514 515 515 GOwnPtr<GError> error; 516 gssize bytesSkipped = g_input_stream_ skip_finish(d->m_inputStream.get(), asyncResult, &error.outPtr());516 gssize bytesSkipped = g_input_stream_read_finish(d->m_inputStream.get(), asyncResult, &error.outPtr()); 517 517 if (error) { 518 518 client->didFail(handle.get(), ResourceError::genericIOError(error.get(), d->m_soupRequest.get())); … … 522 522 523 523 if (bytesSkipped > 0) { 524 g_input_stream_ skip_async(d->m_inputStream.get(), G_MAXSSIZE, G_PRIORITY_DEFAULT,524 g_input_stream_read_async(d->m_inputStream.get(), d->m_buffer, G_MAXSSIZE, G_PRIORITY_DEFAULT, 525 525 d->m_cancellable.get(), redirectSkipCallback, handle.get()); 526 526 return; … … 669 669 } 670 670 671 d->m_buffer = static_cast<char*>(g_slice_alloc(READ_BUFFER_SIZE)); 672 671 673 if (soupMessage) { 672 674 if (SOUP_STATUS_IS_REDIRECTION(soupMessage->status_code) && shouldRedirect(handle.get())) { 673 675 d->m_inputStream = inputStream; 674 g_input_stream_skip_async(d->m_inputStream.get(), G_MAXSSIZE, G_PRIORITY_DEFAULT, 676 // We use read_async() rather than skip_async() to work around 677 // https://bugzilla.gnome.org/show_bug.cgi?id=691489 until we can 678 // depend on glib > 2.35.4 679 g_input_stream_read_async(d->m_inputStream.get(), d->m_buffer, G_MAXSSIZE, G_PRIORITY_DEFAULT, 675 680 d->m_cancellable.get(), redirectSkipCallback, handle.get()); 676 681 return; … … 702 707 return; 703 708 } 704 705 d->m_buffer = static_cast<char*>(g_slice_alloc(READ_BUFFER_SIZE));706 709 707 710 if (soupMessage && d->m_response.isMultipart()) {
Note: See TracChangeset
for help on using the changeset viewer.