Changeset 120042 in webkit
- Timestamp:
- Jun 11, 2012 11:17:27 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r120040 r120042 1 2012-06-11 Kinuko Yasuda <kinuko@chromium.org> 2 3 XHR returns size==0 Blob 4 https://bugs.webkit.org/show_bug.cgi?id=88750 5 6 Reviewed by Alexey Proskuryakov. 7 8 * http/tests/xmlhttprequest/response-blob-size-expected.txt: Added. 9 * http/tests/xmlhttprequest/response-blob-size.html: Added. 10 1 11 2012-06-11 Silvia Pfeiffer <silviapf@chromium.org> 2 12 -
trunk/Source/WebCore/ChangeLog
r120040 r120042 1 2012-06-11 Kinuko Yasuda <kinuko@chromium.org> 2 3 XHR returns size==0 Blob 4 https://bugs.webkit.org/show_bug.cgi?id=88750 5 6 Reviewed by Alexey Proskuryakov. 7 8 Response Blob's .size field must have the correct response size. 9 10 Test: http/tests/xmlhttprequest/response-blob-size.html 11 12 * xml/XMLHttpRequest.cpp: 13 (WebCore::XMLHttpRequest::responseBlob): 14 1 15 2012-06-11 Silvia Pfeiffer <silviapf@chromium.org> 2 16 -
trunk/Source/WebCore/xml/XMLHttpRequest.cpp
r119276 r120042 274 274 return 0; 275 275 276 if (!m_responseBlob .get()) {276 if (!m_responseBlob) { 277 277 // FIXME: This causes two (or more) unnecessary copies of the data. 278 278 // Chromium stores blob data in the browser process, so we're pulling the data … … 284 284 OwnPtr<BlobData> blobData = BlobData::create(); 285 285 // If we errored out or got no data, we still return a blob, just an empty one. 286 if (m_binaryResponseBuilder.get()) { 286 size_t size = 0; 287 if (m_binaryResponseBuilder) { 287 288 RefPtr<RawData> rawData = RawData::create(); 288 size _t size= m_binaryResponseBuilder->size();289 size = m_binaryResponseBuilder->size(); 289 290 rawData->mutableData()->append(m_binaryResponseBuilder->data(), size); 290 291 blobData->appendData(rawData, 0, BlobDataItem::toEndOfFile); … … 292 293 m_binaryResponseBuilder.clear(); 293 294 } 294 m_responseBlob = Blob::create(blobData.release(), m_binaryResponseBuilder.get() ? m_binaryResponseBuilder->size() : 0);295 m_responseBlob = Blob::create(blobData.release(), size); 295 296 } 296 297
Note: See TracChangeset
for help on using the changeset viewer.