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

Issue 214163004: Oilpan: Move database closing task in ~DatabaseBackendSync to a pre-finalization hook with HeapHash… (Closed)

Created:
6 years, 9 months ago by tkent
Modified:
6 years, 9 months ago
CC:
blink-reviews
Visibility:
Public.

Description

Oilpan: Move database closing task in ~DatabaseBackendSync to a pre-finalization hook with HeapHashMap. This is a preparation to move DatabaseContext class to Oilpan heap. We need to access a DatabaseContext during closing a database. So, we can't close the database in ~DatabaseBackendSync if we make DatabaseContext class GarbageCollected. We have a HashSet in DatabaseContext to close opening DatabaseBackendSync on context shutdown. - If a DatabaseBackendSync is alive until context shutdown, DatabaseContext can close it as ever. - If a DatabaseBackendSync is garbage-collected before context shutdown, we need to detect it is about to finalized and need to close it. We change the HashSet to HeapHashMap<WeakMember<DatabaseBackendBase>, OwnPtr<DatabaseCloser>>. It realizes pre-finalization hook. BUG=347902 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=170180

Patch Set 1 #

Total comments: 11

Patch Set 2 : Add a FIXME comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -0 lines) Patch
M Source/modules/webdatabase/DatabaseBackendSync.cpp View 2 chunks +3 lines, -0 lines 0 comments Download
M Source/modules/webdatabase/DatabaseContext.h View 1 chunk +12 lines, -0 lines 0 comments Download
M Source/modules/webdatabase/DatabaseContext.cpp View 1 2 chunks +22 lines, -0 lines 0 comments Download

Messages

Total messages: 32 (0 generated)
tkent
6 years, 9 months ago (2014-03-27 07:13:13 UTC) #1
Mads Ager (chromium)
LGTM https://codereview.chromium.org/214163004/diff/1/Source/modules/webdatabase/DatabaseContext.cpp File Source/modules/webdatabase/DatabaseContext.cpp (right): https://codereview.chromium.org/214163004/diff/1/Source/modules/webdatabase/DatabaseContext.cpp#newcode208 Source/modules/webdatabase/DatabaseContext.cpp:208: for (PersistentHeapHashMap<WeakMember<DatabaseBackendBase>, OwnPtr<DatabaseCloser> >::iterator i = m_openSyncDatabases.begin(); i ...
6 years, 9 months ago (2014-03-27 09:28:17 UTC) #2
haraken
Let me ask a couple of questions to help me understand. https://codereview.chromium.org/214163004/diff/1/Source/modules/webdatabase/DatabaseContext.cpp File Source/modules/webdatabase/DatabaseContext.cpp (right): ...
6 years, 9 months ago (2014-03-27 09:30:12 UTC) #3
Mads Ager (chromium)
Good point that allocation is not allowed in the weak processing. I didn't see allocation ...
6 years, 9 months ago (2014-03-27 09:41:11 UTC) #4
tkent
https://codereview.chromium.org/214163004/diff/1/Source/modules/webdatabase/DatabaseContext.cpp File Source/modules/webdatabase/DatabaseContext.cpp (right): https://codereview.chromium.org/214163004/diff/1/Source/modules/webdatabase/DatabaseContext.cpp#newcode208 Source/modules/webdatabase/DatabaseContext.cpp:208: for (PersistentHeapHashMap<WeakMember<DatabaseBackendBase>, OwnPtr<DatabaseCloser> >::iterator i = m_openSyncDatabases.begin(); i != ...
6 years, 9 months ago (2014-03-27 09:41:52 UTC) #5
tkent
https://codereview.chromium.org/214163004/diff/1/Source/modules/webdatabase/DatabaseContext.cpp File Source/modules/webdatabase/DatabaseContext.cpp (right): https://codereview.chromium.org/214163004/diff/1/Source/modules/webdatabase/DatabaseContext.cpp#newcode193 Source/modules/webdatabase/DatabaseContext.cpp:193: m_database.closeImmediately(); On 2014/03/27 09:41:11, Mads Ager (chromium) wrote: > ...
6 years, 9 months ago (2014-03-27 09:44:48 UTC) #6
Mads Ager (chromium)
On 2014/03/27 09:41:52, tkent wrote: > https://codereview.chromium.org/214163004/diff/1/Source/modules/webdatabase/DatabaseContext.cpp > File Source/modules/webdatabase/DatabaseContext.cpp (right): > > https://codereview.chromium.org/214163004/diff/1/Source/modules/webdatabase/DatabaseContext.cpp#newcode208 > ...
6 years, 9 months ago (2014-03-27 09:45:42 UTC) #7
Mads Ager (chromium)
On 2014/03/27 09:45:42, Mads Ager (chromium) wrote: > On 2014/03/27 09:41:52, tkent wrote: > > ...
6 years, 9 months ago (2014-03-27 09:59:27 UTC) #8
Mads Ager (chromium)
On 2014/03/27 09:59:27, Mads Ager (chromium) wrote: > On 2014/03/27 09:45:42, Mads Ager (chromium) wrote: ...
6 years, 9 months ago (2014-03-27 10:01:05 UTC) #9
tkent
On 2014/03/27 10:01:05, Mads Ager (chromium) wrote: > Should crash but doesn't. Could you add ...
6 years, 9 months ago (2014-03-27 10:31:02 UTC) #10
tkent
The CQ bit was checked by tkent@chromium.org
6 years, 9 months ago (2014-03-27 10:31:07 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tkent@chromium.org/214163004/2
6 years, 9 months ago (2014-03-27 10:31:18 UTC) #12
haraken
LGTM https://codereview.chromium.org/214163004/diff/1/Source/modules/webdatabase/DatabaseContext.cpp File Source/modules/webdatabase/DatabaseContext.cpp (right): https://codereview.chromium.org/214163004/diff/1/Source/modules/webdatabase/DatabaseContext.cpp#newcode193 Source/modules/webdatabase/DatabaseContext.cpp:193: m_database.closeImmediately(); On 2014/03/27 09:44:48, tkent wrote: > On ...
6 years, 9 months ago (2014-03-27 10:45:37 UTC) #13
tkent
https://codereview.chromium.org/214163004/diff/1/Source/modules/webdatabase/DatabaseContext.cpp File Source/modules/webdatabase/DatabaseContext.cpp (right): https://codereview.chromium.org/214163004/diff/1/Source/modules/webdatabase/DatabaseContext.cpp#newcode193 Source/modules/webdatabase/DatabaseContext.cpp:193: m_database.closeImmediately(); On 2014/03/27 10:45:37, haraken wrote: > Things happen ...
6 years, 9 months ago (2014-03-27 10:54:27 UTC) #14
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-27 10:57:22 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on win_blink_compile_dbg
6 years, 9 months ago (2014-03-27 10:57:23 UTC) #16
tkent
The CQ bit was checked by tkent@chromium.org
6 years, 9 months ago (2014-03-27 11:02:23 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tkent@chromium.org/214163004/2
6 years, 9 months ago (2014-03-27 11:02:31 UTC) #18
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-27 11:08:32 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on win_blink_rel
6 years, 9 months ago (2014-03-27 11:08:33 UTC) #20
tkent
The CQ bit was checked by tkent@chromium.org
6 years, 9 months ago (2014-03-27 11:14:19 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tkent@chromium.org/214163004/2
6 years, 9 months ago (2014-03-27 11:14:31 UTC) #22
wibling-chromium
lgtm
6 years, 9 months ago (2014-03-27 11:29:56 UTC) #23
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-27 11:31:45 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on linux_blink_dbg
6 years, 9 months ago (2014-03-27 11:31:46 UTC) #25
tkent
The CQ bit was checked by tkent@chromium.org
6 years, 9 months ago (2014-03-27 11:46:31 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tkent@chromium.org/214163004/2
6 years, 9 months ago (2014-03-27 11:46:36 UTC) #27
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-27 12:57:55 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on linux_blink_dbg
6 years, 9 months ago (2014-03-27 12:57:56 UTC) #29
tkent
The CQ bit was checked by tkent@chromium.org
6 years, 9 months ago (2014-03-27 13:00:07 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tkent@chromium.org/214163004/2
6 years, 9 months ago (2014-03-27 13:00:14 UTC) #31
commit-bot: I haz the power
6 years, 9 months ago (2014-03-27 14:07:11 UTC) #32
Message was sent while issue was closed.
Change committed as 170180

Powered by Google App Engine
This is Rietveld 408576698