Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Issue 2924933002: Fix CookieMonster garbage collection when no insecure cookies. (Closed)

Created:
3 years, 6 months ago by mmenke
Modified:
3 years, 6 months ago
Reviewers:
Mike West
CC:
cbentzel+watch_chromium.org, chromium-reviews, net-reviews_chromium.org, Randy Smith (Not in Mondays)
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix CookieMonster garbage collection when no insecure cookies. The code wanted to always keep at least one insecure cookie around, so it could get the earliest access time of that cookie to update earliest_access_time_, but when there weren't any such cookies, this broke rather badly. That logic for calculating the earliest_access_time_ was also wrong, since it was set either only based on secure cookies, or only based on insecure cookies. This CL fixes both those issues. BUG=730000 Review-Url: https://codereview.chromium.org/2924933002 Cr-Commit-Position: refs/heads/master@{#477689} Committed: https://chromium.googlesource.com/chromium/src/+/f4721d99f41f62c860b20f1cd53911bdd069d338

Patch Set 1 #

Total comments: 3

Patch Set 2 : Update comment #

Patch Set 3 : Oops #

Unified diffs Side-by-side diffs Delta from patch set Stats (+77 lines, -25 lines) Patch
M net/cookies/cookie_monster.h View 1 3 chunks +13 lines, -8 lines 0 comments Download
M net/cookies/cookie_monster.cc View 1 4 chunks +45 lines, -17 lines 0 comments Download
M net/cookies/cookie_monster_unittest.cc View 2 1 chunk +19 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (9 generated)
mmenke
[mkwst]: PTAL. The bug is kinda horrifying, in that we're reading off into random memory, ...
3 years, 6 months ago (2017-06-06 21:55:44 UTC) #4
mmenke
https://codereview.chromium.org/2924933002/diff/1/net/cookies/cookie_monster_unittest.cc File net/cookies/cookie_monster_unittest.cc (right): https://codereview.chromium.org/2924933002/diff/1/net/cookies/cookie_monster_unittest.cc#newcode2218 net/cookies/cookie_monster_unittest.cc:2218: SetCookie(cm.get(), GURL("http://newdomain.com"), "b=2"); If this were a secure cookie, ...
3 years, 6 months ago (2017-06-06 23:19:48 UTC) #7
Mike West
Oh, that's subtle. Thank you for tracking the bug down and submitting this patch. The ...
3 years, 6 months ago (2017-06-07 06:55:47 UTC) #8
mmenke
https://codereview.chromium.org/2924933002/diff/1/net/cookies/cookie_monster.cc File net/cookies/cookie_monster.cc (right): https://codereview.chromium.org/2924933002/diff/1/net/cookies/cookie_monster.cc#newcode2059 net/cookies/cookie_monster.cc:2059: // make it to the secure cookies. On 2017/06/07 ...
3 years, 6 months ago (2017-06-07 15:32:54 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2924933002/40001
3 years, 6 months ago (2017-06-07 15:34:23 UTC) #12
Mike West
On 2017/06/07 at 15:32:54, mmenke wrote: > https://codereview.chromium.org/2924933002/diff/1/net/cookies/cookie_monster.cc > File net/cookies/cookie_monster.cc (right): > > https://codereview.chromium.org/2924933002/diff/1/net/cookies/cookie_monster.cc#newcode2059 ...
3 years, 6 months ago (2017-06-07 15:35:30 UTC) #13
mmenke
On 2017/06/07 15:35:30, Mike West wrote: > On 2017/06/07 at 15:32:54, mmenke wrote: > > ...
3 years, 6 months ago (2017-06-07 15:42:57 UTC) #14
commit-bot: I haz the power
3 years, 6 months ago (2017-06-07 17:14:19 UTC) #17
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/f4721d99f41f62c860b20f1cd539...

Powered by Google App Engine
This is Rietveld 408576698