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

Issue 657023003: Tentative fix of a crash in Oilpan GC after a database thread termination. (Closed)

Created:
6 years, 2 months ago by tkent
Modified:
6 years, 2 months ago
Reviewers:
oilpan-reviews, haraken
CC:
blink-reviews
Project:
blink
Visibility:
Public.

Description

Tentative fix of a crash in Oilpan GC after a database thread termination. Make sure DatabaseThread::m_openDatabaseSet has no backing store when a database thread is terminated. m_openDatabaseSet outlives a database thread, and its backing store is allocated in the database thread. So, we should unlink the backing store before the thread termination. * DatabaseThread::cleanupDatabaseThread It's possible m_openDatabaseSet.size() is zero and m_openDatabaseSet still has backing store in the following scenario: 1. A web page opens a database. m_openDatabaseSet has it. 2. Chromium calls DatabaseTracker::closeDatabasesImmediately() 3. It calls m_openDatabaseSet.remove(). * DatabaseThread::recordDatabaseOpen Don't add a Database object after termination request. I think this can't happen. But we change it just in case. This CL has no tests. It's very hard to make an automated test for the scenario. BUG=423271 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=183730

Patch Set 1 : #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -1 line) Patch
M Source/modules/webdatabase/DatabaseThread.cpp View 2 chunks +4 lines, -1 line 5 comments Download

Messages

Total messages: 10 (4 generated)
tkent
Please review this.
6 years, 2 months ago (2014-10-15 08:14:10 UTC) #3
haraken
LGTM https://codereview.chromium.org/657023003/diff/20001/Source/modules/webdatabase/DatabaseThread.cpp File Source/modules/webdatabase/DatabaseThread.cpp (right): https://codereview.chromium.org/657023003/diff/20001/Source/modules/webdatabase/DatabaseThread.cpp#newcode119 Source/modules/webdatabase/DatabaseThread.cpp:119: m_thread->postTask(new Task(WTF::bind(&DatabaseThread::cleanupDatabaseThreadCompleted, this))); Just help me understand: Why ...
6 years, 2 months ago (2014-10-15 08:20:18 UTC) #5
tkent
https://codereview.chromium.org/657023003/diff/20001/Source/modules/webdatabase/DatabaseThread.cpp File Source/modules/webdatabase/DatabaseThread.cpp (right): https://codereview.chromium.org/657023003/diff/20001/Source/modules/webdatabase/DatabaseThread.cpp#newcode119 Source/modules/webdatabase/DatabaseThread.cpp:119: m_thread->postTask(new Task(WTF::bind(&DatabaseThread::cleanupDatabaseThreadCompleted, this))); On 2014/10/15 08:20:18, haraken wrote: > ...
6 years, 2 months ago (2014-10-15 08:41:22 UTC) #6
tkent
https://codereview.chromium.org/657023003/diff/20001/Source/modules/webdatabase/DatabaseThread.cpp File Source/modules/webdatabase/DatabaseThread.cpp (right): https://codereview.chromium.org/657023003/diff/20001/Source/modules/webdatabase/DatabaseThread.cpp#newcode144 Source/modules/webdatabase/DatabaseThread.cpp:144: m_openDatabaseSet.remove(database); On 2014/10/15 08:41:22, tkent wrote: > On 2014/10/15 ...
6 years, 2 months ago (2014-10-15 08:43:48 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/657023003/20001
6 years, 2 months ago (2014-10-15 08:59:02 UTC) #9
commit-bot: I haz the power
6 years, 2 months ago (2014-10-15 09:02:44 UTC) #10
Message was sent while issue was closed.
Committed patchset #1 (id:20001) as 183730

Powered by Google App Engine
This is Rietveld 408576698