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

Issue 1714013002: Load cookies once per 'document.cookie' read (Closed)

Created:
4 years, 10 months ago by Mike West
Modified:
4 years, 10 months ago
CC:
chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, jam, nasko+codewatch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@reallyonce
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Load cookies once per 'document.cookie' read This patch refactors RenderFrameMessageFilter to read cookies for a URL once when requested via 'document.cookie', rather than reading them once then checking cookie permissions, throwing the data away and requesting it again to build the cookie string. As a drive-by, it also fixes a bug in the logic which prevented same-site cookies from being returned, and fixes a bug in a related test for http-only cookies which turns out to have had no impact on the feature, but meant that it's been basically untested for years. BUG=581650 R=mmenke@chromium.org,rdsmith@chromium.org CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/df1821c63f29298b59528fdb5ab829f5898979f5 Cr-Commit-Position: refs/heads/master@{#377278}

Patch Set 1 #

Total comments: 8

Patch Set 2 : Feedback. #

Total comments: 5

Patch Set 3 : Feedback. #

Patch Set 4 : FILE_PATH_LITERAL #

Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -10 lines) Patch
M content/browser/frame_host/render_frame_message_filter.cc View 1 2 3 chunks +10 lines, -9 lines 0 comments Download
M content/browser/frame_host/render_frame_message_filter_browsertest.cc View 1 2 3 3 chunks +23 lines, -1 line 0 comments Download

Messages

Total messages: 23 (9 generated)
Mike West
Last one, I hope. Thanks for putting up with lots of reviews!
4 years, 10 months ago (2016-02-19 14:06:02 UTC) #2
mmenke
https://codereview.chromium.org/1714013002/diff/1/content/browser/frame_host/render_frame_message_filter.cc File content/browser/frame_host/render_frame_message_filter.cc (right): https://codereview.chromium.org/1714013002/diff/1/content/browser/frame_host/render_frame_message_filter.cc#newcode399 content/browser/frame_host/render_frame_message_filter.cc:399: // 'document.cookie', so do not include http-only cookies. nit: ...
4 years, 10 months ago (2016-02-19 17:34:42 UTC) #3
mmenke
And good job on catching this!
4 years, 10 months ago (2016-02-19 17:34:55 UTC) #4
Mike West
mmenke@: Thanks for the feedback, I figured out that the bug in the test was ...
4 years, 10 months ago (2016-02-22 10:06:15 UTC) #7
jochen (gone - plz use gerrit)
lgtm
4 years, 10 months ago (2016-02-22 14:12:55 UTC) #8
Randy Smith (Not in Mondays)
I think it's worthwhile having a comment in the CL description that the behavior of ...
4 years, 10 months ago (2016-02-22 15:30:59 UTC) #9
mmenke
LGTM https://codereview.chromium.org/1714013002/diff/20001/content/browser/frame_host/render_frame_message_filter.cc File content/browser/frame_host/render_frame_message_filter.cc (right): https://codereview.chromium.org/1714013002/diff/20001/content/browser/frame_host/render_frame_message_filter.cc#newcode399 content/browser/frame_host/render_frame_message_filter.cc:399: // 'document.cookie', so do not include http-only cookies. ...
4 years, 10 months ago (2016-02-22 16:18:45 UTC) #10
Randy Smith (Not in Mondays)
On 2016/02/22 16:18:45, mmenke wrote: > LGTM > > https://codereview.chromium.org/1714013002/diff/20001/content/browser/frame_host/render_frame_message_filter.cc > File content/browser/frame_host/render_frame_message_filter.cc (right): > ...
4 years, 10 months ago (2016-02-22 17:14:04 UTC) #11
Mike West
https://codereview.chromium.org/1714013002/diff/20001/content/browser/frame_host/render_frame_message_filter.cc File content/browser/frame_host/render_frame_message_filter.cc (right): https://codereview.chromium.org/1714013002/diff/20001/content/browser/frame_host/render_frame_message_filter.cc#newcode399 content/browser/frame_host/render_frame_message_filter.cc:399: // 'document.cookie', so do not include http-only cookies. On ...
4 years, 10 months ago (2016-02-24 09:40:30 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1714013002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1714013002/40001
4 years, 10 months ago (2016-02-24 09:40:44 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_compile_dbg_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg_ng/builds/150083)
4 years, 10 months ago (2016-02-24 10:18:31 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1714013002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1714013002/60001
4 years, 10 months ago (2016-02-24 11:43:40 UTC) #20
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 10 months ago (2016-02-24 13:07:30 UTC) #21
commit-bot: I haz the power
4 years, 10 months ago (2016-02-24 13:08:40 UTC) #23
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/df1821c63f29298b59528fdb5ab829f5898979f5
Cr-Commit-Position: refs/heads/master@{#377278}

Powered by Google App Engine
This is Rietveld 408576698