Reviewed by Mitz.
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Feb 2007 10:44:41 +0000 (10:44 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Feb 2007 10:44:41 +0000 (10:44 +0000)
        <rdar://problem/4971224> REGRESSION: ASSERT in WebCore with Mail (12491)
        http://bugs.webkit.org/show_bug.cgi?id=12491

        No test case. Not testable since there is no way to do substitute
        data loads from layout tests.

        * loader/MainResourceLoader.cpp:
        (WebCore::MainResourceLoader::continueAfterContentPolicy): Don't dispatch data load
        callback when loading empty data.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19525 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/loader/MainResourceLoader.cpp

index 9d3234f4095aea5d702f2c652685235bd25892ea..d01907c191d380c6b28779b94215409649e523b5 100644 (file)
@@ -1,3 +1,17 @@
+2007-02-09  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Mitz.
+
+        <rdar://problem/4971224> REGRESSION: ASSERT in WebCore with Mail (12491)
+        http://bugs.webkit.org/show_bug.cgi?id=12491
+
+        No test case. Not testable since there is no way to do substitute
+        data loads from layout tests.
+        
+        * loader/MainResourceLoader.cpp:
+        (WebCore::MainResourceLoader::continueAfterContentPolicy): Don't dispatch data load
+        callback when loading empty data.
+
 2007-02-09  Mark Rowe  <mrowe@apple.com>
 
         Reviewed by Maciej.
index 6f2800399609695d7bb175d57e97b5c6a49390ff..015ce7614ee3fc04c6c773d9d6d19ecdc7d05d0e 100644 (file)
@@ -230,7 +230,8 @@ void MainResourceLoader::continueAfterContentPolicy(PolicyAction contentPolicy,
 
     if (frameLoader() && !frameLoader()->isStopping())
         if (m_substituteData.isValid()) {
-            didReceiveData(m_substituteData.content()->data(), m_substituteData.content()->size(), m_substituteData.content()->size(), true);
+            if (m_substituteData.content()->size())
+                didReceiveData(m_substituteData.content()->data(), m_substituteData.content()->size(), m_substituteData.content()->size(), true);
             if (frameLoader() && !frameLoader()->isStopping()) 
                 didFinishLoading();
         } else if (shouldLoadAsEmptyDocument(url) || frameLoader()->representationExistsForURLScheme(url.protocol()))