webengine/osswebengine/WebCore/loader/icon/IconLoader.cpp
changeset 65 5bfc169077b2
parent 38 6297cdf66332
child 94 919f36ff910f
--- a/webengine/osswebengine/WebCore/loader/icon/IconLoader.cpp	Tue Feb 02 00:56:45 2010 +0200
+++ b/webengine/osswebengine/WebCore/loader/icon/IconLoader.cpp	Fri Mar 19 09:52:28 2010 +0200
@@ -95,13 +95,9 @@
     int status = response.httpStatusCode();
     LOG(IconDatabase, "IconLoader::didReceiveResponse() - Loader %p, response %i", resourceLoader, status);
 
-    // It is possible that we are receiving the response for previous load request which is cancelled.
-    // Process down response of last resource loader only. Ignore if we can not remember other icon load requests. 
-    if(resourceLoader == m_resourceLoader) {
-        if (status && (status < 200 || status > 299)) {
-            ResourceHandle* handle = resourceLoader->handle();
-            finishLoading(handle ? handle->request().url() : KURL(), 0);
-        }
+    if (status && (status < 200 || status > 299)) {
+        ResourceHandle* handle = resourceLoader->handle();
+        finishLoading(handle ? handle->request().url() : KURL(), 0);
     }
 }
 
@@ -118,10 +114,8 @@
     // we need to be prepared to receive this call even after we've "finished loading" once.
     // After it is resolved, we can restore an assertion that the load is in progress if ::didFail() is called
     
-    // It is possible that we are receiving the response for previous load request which is cancelled.
-    // Process down response of last resource loader only. Ignore if we can not remember other icon load requests.    
-    if (m_loadIsInProgress && (resourceLoader == m_resourceLoader)) {
-        //ASSERT(resourceLoader == m_resourceLoader);
+    if (m_loadIsInProgress) {
+        ASSERT(resourceLoader == m_resourceLoader);
         ResourceHandle* handle = resourceLoader->handle();
         finishLoading(handle ? handle->request().url() : KURL(), 0);
     }
@@ -135,10 +129,8 @@
     // we need to be prepared to receive this call even after we've "finished loading" once.
     // After it is resolved, we can restore an assertion that the load is in progress if ::didFail() is called
     
-    // It is possible that we are receiving the response for previous load request which is cancelled.
-    // Process down response of last resource loader only. Ignore if we can not remember other icon load requests.    
-    if (m_loadIsInProgress && (resourceLoader == m_resourceLoader)) {
-        //ASSERT(resourceLoader == m_resourceLoader);
+    if (m_loadIsInProgress) {
+        ASSERT(resourceLoader == m_resourceLoader);
         ResourceHandle* handle = resourceLoader->handle();
         finishLoading(handle ? handle->request().url() : KURL(), m_resourceLoader->resourceData());
     }