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

Issue 178103007: Revert of DatabaseBackend objects should be destructed in the originator thread (Closed)

Created:
6 years, 9 months ago by tkent
Modified:
6 years, 9 months ago
CC:
blink-reviews, kinuko+watch, Nate Chapin, gavinp+loader_chromium.org
Visibility:
Public.

Description

Revert of DatabaseBackend objects should be destructed in the originator thread (https://codereview.chromium.org/183883005/) Reason for revert: Unnecessary change Original issue's description: > DatabaseBackend objects should be destructed in the originator thread. > > Before this CL, it was possible that DatabaseThread held the last > references of DatabaseBackend objects and it was released in the > database thread. > We must destruct objects in the originator thread in Oilpan. > > Implementation: > DatabaseThread::recordDatabaseClosed doesn't remove a RefPtr< > DatabaseBackend>, and we release RefPtr<DatabaseBackend> objects > in ~DatabaseThread, which is executed in the main/worker thread. > Note that there are no ways to close a database explicitly, and > DatabaseBackend objects are never destructed before their > DatabaseContext is stopped. DatabaseThread::recordDatabaseClosed > is actually unnecessary. > > DatabaseThread doesn't know DatabaseBackend open status any longer. > We remove DatabaseThread::isDatabaseOpen, and its existing > callsites use DatabaseBackend::open() instead. > > > BUG=347902 > TEST=none; no visible behavior changes hopefully. > R=michaeln@chromium.org > > Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=168362 TBR=michaeln@chromium.org,oilpan-reviews@chromium.org NOTREECHECKS=true NOTRY=true BUG=347902 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=168431

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -7 lines) Patch
M Source/modules/webdatabase/DatabaseTask.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/webdatabase/DatabaseThread.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/modules/webdatabase/DatabaseThread.cpp View 3 chunks +15 lines, -6 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
tkent
Created Revert of DatabaseBackend objects should be destructed in the originator thread
6 years, 9 months ago (2014-03-05 04:59:03 UTC) #1
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tkent@chromium.org/178103007/1
6 years, 9 months ago (2014-03-05 04:59:49 UTC) #2
commit-bot: I haz the power
6 years, 9 months ago (2014-03-05 05:02:01 UTC) #3
Message was sent while issue was closed.
Change committed as 168431

Powered by Google App Engine
This is Rietveld 408576698