Title: [92985] trunk/Source/WebCore
Revision
92985
Author
[email protected]
Date
2011-08-12 13:33:04 -0700 (Fri, 12 Aug 2011)

Log Message

ResourceLoader::didReceiveDataArray() does not handle m_shouldBufferData correctly
https://bugs.webkit.org/show_bug.cgi?id=65926

Reviewed by Alexey Proskuryakov.

* loader/mac/ResourceLoaderMac.mm:
(WebCore::ResourceLoader::didReceiveDataArray): Make sure we call the client callbacks when
m_shouldBufferData is set to false.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (92984 => 92985)


--- trunk/Source/WebCore/ChangeLog	2011-08-12 20:18:51 UTC (rev 92984)
+++ trunk/Source/WebCore/ChangeLog	2011-08-12 20:33:04 UTC (rev 92985)
@@ -1,3 +1,14 @@
+2011-08-11  Pratik Solanki  <[email protected]>
+
+        ResourceLoader::didReceiveDataArray() does not handle m_shouldBufferData correctly
+        https://bugs.webkit.org/show_bug.cgi?id=65926
+
+        Reviewed by Alexey Proskuryakov.
+
+        * loader/mac/ResourceLoaderMac.mm:
+        (WebCore::ResourceLoader::didReceiveDataArray): Make sure we call the client callbacks when
+        m_shouldBufferData is set to false.
+
 2011-08-12  Sheriff Bot  <[email protected]>
 
         Unreviewed, rolling out r92976.

Modified: trunk/Source/WebCore/loader/mac/ResourceLoaderMac.mm (92984 => 92985)


--- trunk/Source/WebCore/loader/mac/ResourceLoaderMac.mm	2011-08-12 20:18:51 UTC (rev 92984)
+++ trunk/Source/WebCore/loader/mac/ResourceLoaderMac.mm	2011-08-12 20:33:04 UTC (rev 92985)
@@ -76,18 +76,16 @@
     // anything including possibly derefing this; one example of this is Radar 3266216.
     RefPtr<ResourceLoader> protector(this);
 
-    if (!m_shouldBufferData)
-        return;
-
-    if (!m_resourceData)
-        m_resourceData = SharedBuffer::create();
-
     CFIndex arrayCount = CFArrayGetCount(dataArray);
     for (CFIndex i = 0; i < arrayCount; ++i) {
         CFDataRef data = "" i));
         int dataLen = static_cast<int>(CFDataGetLength(data));
 
-        m_resourceData->append(data);
+        if (m_shouldBufferData) {
+            if (!m_resourceData)
+                m_resourceData = SharedBuffer::create();
+            m_resourceData->append(data);
+        }
 
         // FIXME: If we get a resource with more than 2B bytes, this code won't do the right thing.
         // However, with today's computers and networking speeds, this won't happen in practice.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to