WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
72353
[SOUP][WK2] Implement the functions to manager cookies in CookieJar for WebKit2
https://bugs.webkit.org/show_bug.cgi?id=72353
Summary
[SOUP][WK2] Implement the functions to manager cookies in CookieJar for WebKit2
Jongseok Yang
Reported
2011-11-14 22:32:46 PST
r79722
inserted the functions to manange cookies from web process.(getHostnamesWithCookies,deleteCookiesForHostname,deleteAllCookies) The functions in CookieJarSoup.cpp are not implemented.
Attachments
patch
(2.82 KB, patch)
2011-11-14 22:36 PST
,
Jongseok Yang
no flags
Details
Formatted Diff
Diff
Patch
(2.96 KB, patch)
2011-11-28 21:45 PST
,
Jongseok Yang
no flags
Details
Formatted Diff
Diff
Patch
(2.88 KB, patch)
2011-11-29 06:12 PST
,
Jongseok Yang
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Jongseok Yang
Comment 1
2011-11-14 22:36:32 PST
Created
attachment 115099
[details]
patch
Martin Robinson
Comment 2
2011-11-23 07:47:28 PST
Comment on
attachment 115099
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=115099&action=review
Looks fine to me, but I have some style nits.
> Source/WebCore/platform/network/soup/CookieJarSoup.cpp:131 > + GSList* cookies; > + GSList* item; > + SoupCookie* soupCookie; > + char* domain; > +
In WebKit we typically declare variables when they are first used and in the scope they are used.
> Source/WebCore/platform/network/soup/CookieJarSoup.cpp:150 > + GSList* cookies; > + GSList* item; > + SoupCookie* soupCookie; > + char* domain;
Ditto.
> Source/WebCore/platform/network/soup/CookieJarSoup.cpp:168 > + GSList* cookies; > + GSList* item;
Ditto.
Martin Robinson
Comment 3
2011-11-23 07:49:33 PST
Comment on
attachment 115099
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=115099&action=review
> Source/WebCore/platform/network/soup/CookieJarSoup.cpp:158 > + if (domain && domain == hostname)
Here you should first convert the hostname to a UTF-8 CString and compare the utf8Hostname.data() with g_str_equal. This is an error because it's comparing a system locale string with a UTF-8 string.
Jongseok Yang
Comment 4
2011-11-28 21:45:00 PST
Created
attachment 116885
[details]
Patch
Gyuyoung Kim
Comment 5
2011-11-28 22:54:51 PST
CC'ing Martin.
Martin Robinson
Comment 6
2011-11-29 04:10:43 PST
Comment on
attachment 116885
[details]
Patch 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()).
Jongseok Yang
Comment 7
2011-11-29 06:12:56 PST
Created
attachment 116957
[details]
Patch
Gyuyoung Kim
Comment 8
2011-11-29 17:33:30 PST
Comment on
attachment 116957
[details]
Patch LGTM.
WebKit Review Bot
Comment 9
2011-11-30 03:08:05 PST
Comment on
attachment 116957
[details]
Patch Clearing flags on attachment: 116957 Committed
r101474
: <
http://trac.webkit.org/changeset/101474
>
WebKit Review Bot
Comment 10
2011-11-30 03:08:10 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug