Changeset 85984 in webkit


Ignore:
Timestamp:
May 6, 2011 4:06:02 PM (13 years ago)
Author:
Martin Robinson
Message:

2011-05-06 Martin Robinson <mrobinson@igalia.com>

Reviewed by Xan Lopez.

[Soup] ResourceHandles are leaked on 304 responses
https://bugs.webkit.org/show_bug.cgi?id=60413

Always call cleanupSoupRequestOperation, even when the request was not
canceled. Before the code would call didFinishLoading and then never clean up
the request.

No new tests. This simply fixes a memory leak.

  • platform/network/soup/ResourceHandleSoup.cpp: (WebCore::sendRequestCallback):
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r85975 r85984  
     12011-05-06  Martin Robinson  <mrobinson@igalia.com>
     2
     3        Reviewed by Xan Lopez.
     4
     5        [Soup] ResourceHandles are leaked on 304 responses
     6        https://bugs.webkit.org/show_bug.cgi?id=60413
     7
     8        Always call cleanupSoupRequestOperation, even when the request was not
     9        canceled. Before the code would call didFinishLoading and then never clean up
     10        the request.
     11
     12        No new tests. This simply fixes a memory leak.
     13
     14        * platform/network/soup/ResourceHandleSoup.cpp:
     15        (WebCore::sendRequestCallback):
     16
    1172011-05-06  Adam Barth  <abarth@webkit.org>
    218
  • trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp

    r85207 r85984  
    469469        }
    470470
    471         // didReceiveData above might have cancelled it
    472         if (d->m_cancelled || !client) {
    473             cleanupSoupRequestOperation(handle.get());
    474             return;
    475         }
    476 
    477         client->didFinishLoading(handle.get(), 0);
     471        // didReceiveData above might have canceled this operation. If not, inform the client we've finished loading.
     472        if (!d->m_cancelled && client)
     473            client->didFinishLoading(handle.get(), 0);
     474
     475        cleanupSoupRequestOperation(handle.get());
    478476        return;
    479477    }
Note: See TracChangeset for help on using the changeset viewer.