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

Issue 93873017: IndexedDBFactory now ForceCloses databases. (Closed)

Created:
7 years ago by cmumford
Modified:
6 years, 11 months ago
Reviewers:
dgrogan, jsbell
CC:
chromium-reviews, jam, alecflett, joi+watch-content_chromium.org, darin-cc_chromium.org, dgrogan
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Unrevert 244240 "IndexedDBFactory now ForceCloses databases." First implementation contained a memory leak in the test due to a missing scoped_ptr. BUG=259564 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=244369

Patch Set 1 #

Total comments: 3

Patch Set 2 : Removed {} and ran git cl format. #

Total comments: 18

Patch Set 3 : Fixed iter's and -virtual #

Patch Set 4 : Fully removed connection map from IndexedDBContextImpl. #

Patch Set 5 : Added multimap for more efficient origin->db mapping. #

Total comments: 11

Patch Set 6 : Cleaned up iterator usage, removed local copy of conns. #

Total comments: 4

Patch Set 7 : ForceClosing connections using iterators to avoid possible infinite loop. #

Total comments: 2

Patch Set 8 : DCHECK'ing that connections_ is empty after force closing them all. #

Patch Set 9 : Erasing with non-const iterator. #

Patch Set 10 : Fixed memory leak #

Unified diffs Side-by-side diffs Delta from patch set Stats (+132 lines, -92 lines) Patch
M content/browser/indexed_db/indexed_db_context_impl.h View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download
M content/browser/indexed_db/indexed_db_context_impl.cc View 1 2 3 4 5 6 5 chunks +10 lines, -31 lines 0 comments Download
M content/browser/indexed_db/indexed_db_database.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/indexed_db/indexed_db_database.cc View 1 2 3 4 5 6 7 1 chunk +11 lines, -0 lines 0 comments Download
M content/browser/indexed_db/indexed_db_factory.h View 1 2 3 4 5 4 chunks +8 lines, -2 lines 0 comments Download
M content/browser/indexed_db/indexed_db_factory.cc View 1 2 3 4 5 6 7 8 4 chunks +51 lines, -16 lines 0 comments Download
M content/browser/indexed_db/indexed_db_unittest.cc View 1 2 3 4 5 6 7 8 9 3 chunks +51 lines, -41 lines 0 comments Download

Messages

Total messages: 29 (0 generated)
cmumford
dgrogan@chromium.org: Please review changes in jsbell@chromium.org: Please review changes in Two things: 1. I had ...
7 years ago (2013-12-19 21:58:01 UTC) #1
jsbell
A few nits. Yeah, it'd be nice to get the context out of the business ...
7 years ago (2013-12-19 22:35:34 UTC) #2
cmumford
On 2013/12/19 22:35:34, jsbell wrote: > A few nits. > > Yeah, it'd be nice ...
7 years ago (2013-12-19 23:32:50 UTC) #3
jsbell
https://codereview.chromium.org/93873017/diff/20001/content/browser/indexed_db/indexed_db_context_impl.cc File content/browser/indexed_db/indexed_db_context_impl.cc (left): https://codereview.chromium.org/93873017/diff/20001/content/browser/indexed_db/indexed_db_context_impl.cc#oldcode348 content/browser/indexed_db/indexed_db_context_impl.cc:348: DCHECK_EQ(connections_[origin_url].size(), 0UL); Maybe replace this with DCHECK_EQ(0UL, GetConnectionCount(origin_url)) for ...
7 years ago (2013-12-20 00:24:41 UTC) #4
jsbell
> Let me know if you want me to drop the context in this CR ...
7 years ago (2013-12-20 00:25:24 UTC) #5
cmumford
https://codereview.chromium.org/93873017/diff/20001/content/browser/indexed_db/indexed_db_context_impl.cc File content/browser/indexed_db/indexed_db_context_impl.cc (left): https://codereview.chromium.org/93873017/diff/20001/content/browser/indexed_db/indexed_db_context_impl.cc#oldcode348 content/browser/indexed_db/indexed_db_context_impl.cc:348: DCHECK_EQ(connections_[origin_url].size(), 0UL); On 2013/12/20 00:24:42, jsbell wrote: > Maybe ...
7 years ago (2013-12-20 18:09:26 UTC) #6
jsbell
https://codereview.chromium.org/93873017/diff/20001/content/browser/indexed_db/indexed_db_context_impl.cc File content/browser/indexed_db/indexed_db_context_impl.cc (left): https://codereview.chromium.org/93873017/diff/20001/content/browser/indexed_db/indexed_db_context_impl.cc#oldcode348 content/browser/indexed_db/indexed_db_context_impl.cc:348: DCHECK_EQ(connections_[origin_url].size(), 0UL); On 2013/12/20 18:09:26, cmumford wrote: > On ...
7 years ago (2013-12-20 18:22:56 UTC) #7
cmumford
I wound up completely removing IndexedDBContextImpl's connections_ map. I was originally going to clean that ...
6 years, 11 months ago (2014-01-02 21:41:13 UTC) #8
jsbell
Yay, nice to see the context getting simpler! https://codereview.chromium.org/93873017/diff/150001/content/browser/indexed_db/indexed_db_context_impl.cc File content/browser/indexed_db/indexed_db_context_impl.cc (right): https://codereview.chromium.org/93873017/diff/150001/content/browser/indexed_db/indexed_db_context_impl.cc#newcode406 content/browser/indexed_db/indexed_db_context_impl.cc:406: DCHECK(factory_->GetConnectionCount(origin_url) ...
6 years, 11 months ago (2014-01-03 00:34:24 UTC) #9
cmumford
https://codereview.chromium.org/93873017/diff/150001/content/browser/indexed_db/indexed_db_context_impl.cc File content/browser/indexed_db/indexed_db_context_impl.cc (right): https://codereview.chromium.org/93873017/diff/150001/content/browser/indexed_db/indexed_db_context_impl.cc#newcode406 content/browser/indexed_db/indexed_db_context_impl.cc:406: DCHECK(factory_->GetConnectionCount(origin_url) > 0); On 2014/01/03 00:34:25, jsbell wrote: > ...
6 years, 11 months ago (2014-01-03 21:34:01 UTC) #10
jsbell
https://codereview.chromium.org/93873017/diff/150001/content/browser/indexed_db/indexed_db_factory.cc File content/browser/indexed_db/indexed_db_factory.cc (right): https://codereview.chromium.org/93873017/diff/150001/content/browser/indexed_db/indexed_db_factory.cc#newcode371 content/browser/indexed_db/indexed_db_factory.cc:371: std::pair<OriginDbMapIterator, OriginDbMapIterator> range = Oops, you're right, sorry.
6 years, 11 months ago (2014-01-03 21:37:25 UTC) #11
cmumford
Uploaded patchset 6 with requested changes.
6 years, 11 months ago (2014-01-03 21:49:10 UTC) #12
jsbell
lgtm with a couple nits https://codereview.chromium.org/93873017/diff/240001/content/browser/indexed_db/indexed_db_context_impl.cc File content/browser/indexed_db/indexed_db_context_impl.cc (right): https://codereview.chromium.org/93873017/diff/240001/content/browser/indexed_db/indexed_db_context_impl.cc#newcode342 content/browser/indexed_db/indexed_db_context_impl.cc:342: DCHECK_EQ(0UL, GetConnectionCount(origin_url)); Nit: This ...
6 years, 11 months ago (2014-01-06 22:33:49 UTC) #13
cmumford
https://codereview.chromium.org/93873017/diff/240001/content/browser/indexed_db/indexed_db_context_impl.cc File content/browser/indexed_db/indexed_db_context_impl.cc (right): https://codereview.chromium.org/93873017/diff/240001/content/browser/indexed_db/indexed_db_context_impl.cc#newcode342 content/browser/indexed_db/indexed_db_context_impl.cc:342: DCHECK_EQ(0UL, GetConnectionCount(origin_url)); On 2014/01/06 22:33:50, jsbell wrote: > Nit: ...
6 years, 11 months ago (2014-01-09 00:48:24 UTC) #14
jsbell
still LGTM but one more nit https://codereview.chromium.org/93873017/diff/310001/content/browser/indexed_db/indexed_db_database.cc File content/browser/indexed_db/indexed_db_database.cc (right): https://codereview.chromium.org/93873017/diff/310001/content/browser/indexed_db/indexed_db_database.cc#newcode1599 content/browser/indexed_db/indexed_db_database.cc:1599: } Can you ...
6 years, 11 months ago (2014-01-09 18:09:10 UTC) #15
cmumford
All local unit tests passed with latest change. I'm going to commit. https://codereview.chromium.org/93873017/diff/310001/content/browser/indexed_db/indexed_db_database.cc File content/browser/indexed_db/indexed_db_database.cc ...
6 years, 11 months ago (2014-01-09 18:46:09 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cmumford@chromium.org/93873017/370002
6 years, 11 months ago (2014-01-09 18:50:20 UTC) #17
commit-bot: I haz the power
Retried try job too often on mac_rel for step(s) base_unittests, browser_tests, interactive_ui_tests, net_unittests, unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_rel&number=209932
6 years, 11 months ago (2014-01-09 19:16:40 UTC) #18
cmumford
erase in IndexedDBFactory::RemoveDatabaseFromMaps was failing because I was using a const_iterator which is OK in ...
6 years, 11 months ago (2014-01-09 22:11:35 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cmumford@chromium.org/93873017/350003
6 years, 11 months ago (2014-01-09 22:47:45 UTC) #20
commit-bot: I haz the power
Retried try job too often on linux_aura for step(s) interactive_ui_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_aura&number=111354
6 years, 11 months ago (2014-01-10 00:44:46 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cmumford@chromium.org/93873017/350003
6 years, 11 months ago (2014-01-10 18:42:14 UTC) #22
commit-bot: I haz the power
Change committed as 244240
6 years, 11 months ago (2014-01-10 21:11:17 UTC) #23
cmumford
A revert of this CL has been created in https://codereview.chromium.org/134693005/ by cmumford@chromium.org. The reason for ...
6 years, 11 months ago (2014-01-10 21:56:11 UTC) #24
cmumford
Fixed memory leak
6 years, 11 months ago (2014-01-11 00:09:02 UTC) #25
cmumford
Memory leak is fixed (thx Josh)
6 years, 11 months ago (2014-01-11 00:11:42 UTC) #26
jsbell
leak fix lgtm
6 years, 11 months ago (2014-01-11 00:26:17 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cmumford@chromium.org/93873017/920001
6 years, 11 months ago (2014-01-11 00:44:16 UTC) #28
commit-bot: I haz the power
6 years, 11 months ago (2014-01-11 22:38:24 UTC) #29
Message was sent while issue was closed.
Change committed as 244369

Powered by Google App Engine
This is Rietveld 408576698