Title: [152207] trunk/Source/WebCore
- Revision
- 152207
- Author
- [email protected]
- Date
- 2013-06-29 00:25:37 -0700 (Sat, 29 Jun 2013)
Log Message
REGRESSION(151586): multipart/x-mixed-replace images are broken
https://bugs.webkit.org/show_bug.cgi?id=118169
Reviewed by Alexey Proskuryakov.
When loading multipart content the resource data will change as
the next part is loaded, so we need to make a copy of the data
before sending it to the resource.
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didReceiveResponse):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (152206 => 152207)
--- trunk/Source/WebCore/ChangeLog 2013-06-29 06:02:59 UTC (rev 152206)
+++ trunk/Source/WebCore/ChangeLog 2013-06-29 07:25:37 UTC (rev 152207)
@@ -1,3 +1,17 @@
+2013-06-29 Carlos Garcia Campos <[email protected]>
+
+ REGRESSION(151586): multipart/x-mixed-replace images are broken
+ https://bugs.webkit.org/show_bug.cgi?id=118169
+
+ Reviewed by Alexey Proskuryakov.
+
+ When loading multipart content the resource data will change as
+ the next part is loaded, so we need to make a copy of the data
+ before sending it to the resource.
+
+ * loader/SubresourceLoader.cpp:
+ (WebCore::SubresourceLoader::didReceiveResponse):
+
2013-06-28 Eric Carlson <[email protected]>
[Mac] adopt new AVFoundation caption API
Modified: trunk/Source/WebCore/loader/SubresourceLoader.cpp (152206 => 152207)
--- trunk/Source/WebCore/loader/SubresourceLoader.cpp 2013-06-29 06:02:59 UTC (rev 152206)
+++ trunk/Source/WebCore/loader/SubresourceLoader.cpp 2013-06-29 07:25:37 UTC (rev 152207)
@@ -208,7 +208,9 @@
RefPtr<ResourceBuffer> buffer = resourceData();
if (m_loadingMultipartContent && buffer && buffer->size()) {
- m_resource->finishLoading(buffer.get());
+ // The resource data will change as the next part is loaded, so we need to make a copy.
+ RefPtr<ResourceBuffer> copiedData = ResourceBuffer::create(buffer->data(), buffer->size());
+ m_resource->finishLoading(copiedData.get());
clearResourceData();
// Since a subresource loader does not load multipart sections progressively, data was delivered to the loader all at once.
// After the first multipart section is complete, signal to delegates that this load is "finished"
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes