Changeset 143204 in webkit
- Timestamp:
- Feb 18, 2013 5:29:35 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r143202 r143204 1 2013-02-18 Christophe Dumez <ch.dumez@sisa.samsung.com> 2 3 [Soup] CookieJarSoup::deleteCookie() should stop looking for the cookie after it is removed 4 https://bugs.webkit.org/show_bug.cgi?id=110100 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 CookieJarSoup::deleteCookie() retrieves the list of cookies that apply to a given URL, then 9 iterates through the cookies to find the one with the right name and delete it. However, the 10 current implementation keeps on comparing cookie names after the cookie was removed. This 11 patch introduces a "wasDeleted" boolean to stop comparing cookie names after the cookie was 12 deleted. Note that we cannot break as soon as the cookie is found as we need to keep iterating 13 so that the cookies get freed by GOwnPtr. 14 15 No new tests, no behavior change. 16 17 * platform/network/soup/CookieJarSoup.cpp: 18 (WebCore::deleteCookie): 19 1 20 2013-02-18 Vsevolod Vlasov <vsevik@chromium.org> 2 21 -
trunk/Source/WebCore/platform/network/soup/CookieJarSoup.cpp
r143009 r143204 170 170 171 171 CString cookieName = name.utf8(); 172 bool wasDeleted = false; 172 173 for (GSList* iter = cookies.get(); iter; iter = g_slist_next(iter)) { 173 174 GOwnPtr<SoupCookie> cookie(static_cast<SoupCookie*>(iter->data)); 174 if ( cookieName == cookie->name)175 if (!wasDeleted && cookieName == cookie->name) { 175 176 soup_cookie_jar_delete_cookie(jar, cookie.get()); 177 wasDeleted = true; 178 } 176 179 } 177 180 }
Note: See TracChangeset
for help on using the changeset viewer.