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

Issue 2861473002: Clear up session only storage on localstorage shutdown (Closed)

Created:
3 years, 7 months ago by Marijn Kruisselbrink
Modified:
3 years, 7 months ago
Reviewers:
michaeln
CC:
Aaron Boodman, abarth-chromium, chromium-reviews, darin (slow to review), darin-cc_chromium.org, jam, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Clear up session only storage on localstorage shutdown This changes LocalStorageContextMojo to manage its own destruction, to allow it to outlive the DOMStorageContextWrapper that owns is, in order to finish cleaning up on shutdown. This also moves LocalStorageContextMojo away from the UI thread to the IO thread, because shutdown sequence won't let the UI thread make progress. Ultimately this should probably use a task scheduler managed SequencedTaskRunner, but currently mojo doesn't work on sequenced task runners yet, and introducing an entire new thread for this seems too heavy weight. BUG=586194 Review-Url: https://codereview.chromium.org/2861473002 Cr-Commit-Position: refs/heads/master@{#473073} Committed: https://chromium.googlesource.com/chromium/src/+/5f4cb613f6dfaa504efc346f278899ae5d995187

Patch Set 1 #

Patch Set 2 : test and nicer #

Total comments: 10

Patch Set 3 : address comments #

Patch Set 4 : rebase #

Total comments: 6

Patch Set 5 : address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+312 lines, -83 lines) Patch
M content/browser/dom_storage/dom_storage_browsertest.cc View 1 2 3 2 chunks +9 lines, -12 lines 0 comments Download
M content/browser/dom_storage/dom_storage_context_wrapper.h View 1 2 3 4 1 chunk +5 lines, -2 lines 0 comments Download
M content/browser/dom_storage/dom_storage_context_wrapper.cc View 1 2 3 8 chunks +87 lines, -19 lines 0 comments Download
M content/browser/dom_storage/local_storage_context_mojo.h View 1 2 3 4 6 chunks +38 lines, -7 lines 0 comments Download
M content/browser/dom_storage/local_storage_context_mojo.cc View 1 2 3 4 5 chunks +73 lines, -4 lines 0 comments Download
M content/browser/dom_storage/local_storage_context_mojo_unittest.cc View 1 2 3 10 chunks +100 lines, -39 lines 0 comments Download

Messages

Total messages: 42 (33 generated)
Marijn Kruisselbrink
3 years, 7 months ago (2017-05-02 23:09:45 UTC) #16
michaeln
https://codereview.chromium.org/2861473002/diff/60001/content/browser/dom_storage/dom_storage_browsertest.cc File content/browser/dom_storage/dom_storage_browsertest.cc (right): https://codereview.chromium.org/2861473002/diff/60001/content/browser/dom_storage/dom_storage_browsertest.cc#newcode80 content/browser/dom_storage/dom_storage_browsertest.cc:80: base::RunLoop().RunUntilIdle(); I'm not sure what the RunUntilIdle() here accomplished ...
3 years, 7 months ago (2017-05-03 21:01:30 UTC) #19
michaeln
Also, I think StorageParitionImpl::OpenLocalStorage running on the main thread is probably also a problem for ...
3 years, 7 months ago (2017-05-03 21:33:40 UTC) #20
Marijn Kruisselbrink
On 2017/05/03 at 21:33:40, michaeln wrote: > Also, I think StorageParitionImpl::OpenLocalStorage running on the main ...
3 years, 7 months ago (2017-05-04 23:03:46 UTC) #23
Marijn Kruisselbrink
michaeln: ping, now you're back?
3 years, 7 months ago (2017-05-18 16:51:03 UTC) #31
michaeln
lgtm! https://codereview.chromium.org/2861473002/diff/100001/content/browser/dom_storage/dom_storage_context_wrapper.h File content/browser/dom_storage/dom_storage_context_wrapper.h (left): https://codereview.chromium.org/2861473002/diff/100001/content/browser/dom_storage/dom_storage_context_wrapper.h#oldcode103 content/browser/dom_storage/dom_storage_context_wrapper.h:103: std::unique_ptr<LocalStorageContextMojo> mojo_state_; maybe continue using std::unique_ptr<> to document ...
3 years, 7 months ago (2017-05-18 23:55:39 UTC) #32
Marijn Kruisselbrink
https://codereview.chromium.org/2861473002/diff/100001/content/browser/dom_storage/dom_storage_context_wrapper.h File content/browser/dom_storage/dom_storage_context_wrapper.h (left): https://codereview.chromium.org/2861473002/diff/100001/content/browser/dom_storage/dom_storage_context_wrapper.h#oldcode103 content/browser/dom_storage/dom_storage_context_wrapper.h:103: std::unique_ptr<LocalStorageContextMojo> mojo_state_; On 2017/05/18 at 23:55:39, michaeln wrote: > ...
3 years, 7 months ago (2017-05-19 00:19:46 UTC) #35
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/2861473002/120001
3 years, 7 months ago (2017-05-19 00:52:26 UTC) #39
commit-bot: I haz the power
3 years, 7 months ago (2017-05-19 03:58:08 UTC) #42
Message was sent while issue was closed.
Committed patchset #5 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/5f4cb613f6dfaa504efc346f2788...

Powered by Google App Engine
This is Rietveld 408576698