Title: [141811] trunk/Source/WebCore
Revision
141811
Author
[email protected]
Date
2013-02-04 14:19:48 -0800 (Mon, 04 Feb 2013)

Log Message

REGRESSION (r137607): Loading of archives as substitute data is broken
https://bugs.webkit.org/show_bug.cgi?id=108589

Reviewed by Alexey Proskuryakov.

* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::resourceData): Return the content from
    SubstituteData as mainResourceData if present.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (141810 => 141811)


--- trunk/Source/WebCore/ChangeLog	2013-02-04 22:18:00 UTC (rev 141810)
+++ trunk/Source/WebCore/ChangeLog	2013-02-04 22:19:48 UTC (rev 141811)
@@ -1,3 +1,14 @@
+2013-02-04  Nate Chapin  <[email protected]>
+
+        REGRESSION (r137607): Loading of archives as substitute data is broken
+        https://bugs.webkit.org/show_bug.cgi?id=108589
+
+        Reviewed by Alexey Proskuryakov.
+
+        * loader/MainResourceLoader.cpp:
+        (WebCore::MainResourceLoader::resourceData): Return the content from
+            SubstituteData as mainResourceData if present.
+
 2013-02-04  Julien Chaffraix  <[email protected]>
 
         [CSS Grid Layout] Heap-buffer-overflow in std::sort

Modified: trunk/Source/WebCore/loader/MainResourceLoader.cpp (141810 => 141811)


--- trunk/Source/WebCore/loader/MainResourceLoader.cpp	2013-02-04 22:18:00 UTC (rev 141810)
+++ trunk/Source/WebCore/loader/MainResourceLoader.cpp	2013-02-04 22:19:48 UTC (rev 141811)
@@ -207,7 +207,12 @@
 
 PassRefPtr<ResourceBuffer> MainResourceLoader::resourceData()
 {
-    return m_resource ? m_resource->resourceBuffer() : 0;
+    ASSERT(!m_resource || !m_substituteData.isValid());
+    if (m_resource)
+        return m_resource->resourceBuffer();
+    if (m_substituteData.isValid())
+        return ResourceBuffer::create(m_substituteData.content()->data(), m_substituteData.content()->size());
+    return 0;
 }
 
 void MainResourceLoader::redirectReceived(CachedResource* resource, ResourceRequest& request, const ResourceResponse& redirectResponse)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to