[Webkit-unassigned] [Bug 72353] [SOUP][WK2] Implement the functions to manager cookies in CookieJar for WebKit2

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 29 04:10:44 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=72353


Martin Robinson <mrobinson at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #116885|review?                     |review-
               Flag|                            |




--- Comment #6 from Martin Robinson <mrobinson at webkit.org>  2011-11-29 04:10:43 PST ---
(From update of attachment 116885)
View in context: https://bugs.webkit.org/attachment.cgi?id=116885&action=review

> Source/WebCore/platform/network/soup/CookieJarSoup.cpp:132
> +        char* domain = const_cast<char*>(soup_cookie_get_domain(soupCookie));
> +        if (domain)

You can just do:

if (char* domain = const_cast<char*>(soup_cookie_get_domain(soupCookie)))

> Source/WebCore/platform/network/soup/CookieJarSoup.cpp:133
> +            hostnames.add(domain);

Whoops. Seems I missed this in my first review. This you are implicitly converting from from a UTF-8 c string to a String here, which uses the system locale. For ths kind of thing you need to use String::fromUTF8.

> Source/WebCore/platform/network/soup/CookieJarSoup.cpp:148
> +        if (domain && g_str_equal(domain, hostNameString.data()))

I think this can be simplified to be if (domain == hostNameString) or !g_strcmp0(domain,  hostNameString.data()).

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list