Title: [171621] tags/Safari-600.1.3/Source/WebCore
Revision
171621
Author
[email protected]
Date
2014-07-25 15:08:28 -0700 (Fri, 25 Jul 2014)

Log Message

Merge r171619. <rdar://problem/17811922>

Modified Paths

Diff

Modified: tags/Safari-600.1.3/Source/WebCore/ChangeLog (171620 => 171621)


--- tags/Safari-600.1.3/Source/WebCore/ChangeLog	2014-07-25 22:05:24 UTC (rev 171620)
+++ tags/Safari-600.1.3/Source/WebCore/ChangeLog	2014-07-25 22:08:28 UTC (rev 171621)
@@ -1,3 +1,28 @@
+2014-07-25  Matthew Hanson  <[email protected]>
+
+        Merge r171619. <rdar://problem/17811922>
+
+    2014-07-25  Pratik Solanki  <[email protected]>
+
+            [iOS] REGRESSION(r171526): Images fail to load sometimes
+            https://bugs.webkit.org/show_bug.cgi?id=135304
+            <rdar://problem/17811922>
+
+            Reviewed by Alexey Proskuryakov.
+
+            SharedBuffer::createCFData() calls data() as a way to coalesce the data array elements and
+            segments into m_buffer. However, data() has an optimization where if we had a single element
+            in the data array, it would just return that and not do coalescing. So when we passed
+            m_buffer to WebCoreSharedData, we passed a buffer with no data in it.
+
+            Fix this by bringing the optimization to createCFData() and return the CFDataRef from the
+            data array if we just have a single element.
+
+            No new tests. Should be covered by existing tests.
+
+            * platform/mac/SharedBufferMac.mm:
+            (WebCore::SharedBuffer::createCFData):
+
 2014-07-25  Lucas Forschler  <[email protected]>
 
         Merge r171593

Modified: tags/Safari-600.1.3/Source/WebCore/platform/mac/SharedBufferMac.mm (171620 => 171621)


--- tags/Safari-600.1.3/Source/WebCore/platform/mac/SharedBufferMac.mm	2014-07-25 22:05:24 UTC (rev 171620)
+++ tags/Safari-600.1.3/Source/WebCore/platform/mac/SharedBufferMac.mm	2014-07-25 22:08:28 UTC (rev 171621)
@@ -105,6 +105,11 @@
     if (m_cfData)
         return m_cfData;
 
+#if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
+    if (m_dataArray.size() == 1)
+        return m_dataArray.at(0);
+#endif
+
     data(); // Force data into m_buffer from segments or data array.
     if (hasPurgeableBuffer()) {
         RefPtr<SharedBuffer::DataBuffer> copiedBuffer = adoptRef(new DataBuffer);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to