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

Issue 183093002: Ensure that scheduled tasks are executed during db thread shutdown (Closed)

Created:
6 years, 9 months ago by jochen (gone - plz use gerrit)
Modified:
6 years, 9 months ago
CC:
blink-reviews, kinuko+watch
Visibility:
Public.

Description

Ensure that scheduled tasks are executed during db thread shutdown Since closing the databases on the database thread can schedule new cleanup tasks, we need to postTask the notificatino that we're done. BUG=333058 R=michaeln@chromium.org, abarth@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=168059

Patch Set 1 #

Total comments: 2

Patch Set 2 : updates #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M Source/modules/webdatabase/DatabaseThread.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 14 (0 generated)
jochen (gone - plz use gerrit)
6 years, 9 months ago (2014-02-27 13:00:00 UTC) #1
adamk
https://codereview.chromium.org/183093002/diff/1/Source/core/workers/WorkerThread.cpp File Source/core/workers/WorkerThread.cpp (left): https://codereview.chromium.org/183093002/diff/1/Source/core/workers/WorkerThread.cpp#oldcode232 Source/core/workers/WorkerThread.cpp:232: DatabaseManager::manager().interruptAllDatabasesForContext(m_workerGlobalScope.get()); I've been curious for awhile about why this ...
6 years, 9 months ago (2014-02-27 17:28:26 UTC) #2
michaeln
There are cases where the workerthread can block on the dbthread (ala taskSynchrnozer stuff). The ...
6 years, 9 months ago (2014-02-27 19:38:16 UTC) #3
jochen (gone - plz use gerrit)
https://codereview.chromium.org/183093002/diff/1/Source/core/workers/WorkerThread.cpp File Source/core/workers/WorkerThread.cpp (left): https://codereview.chromium.org/183093002/diff/1/Source/core/workers/WorkerThread.cpp#oldcode232 Source/core/workers/WorkerThread.cpp:232: DatabaseManager::manager().interruptAllDatabasesForContext(m_workerGlobalScope.get()); On 2014/02/27 17:28:26, adamk wrote: > I've been ...
6 years, 9 months ago (2014-02-27 19:40:55 UTC) #4
jochen (gone - plz use gerrit)
On 2014/02/27 19:40:55, jochen (OOO from March 1) wrote: > https://codereview.chromium.org/183093002/diff/1/Source/core/workers/WorkerThread.cpp > File Source/core/workers/WorkerThread.cpp (left): ...
6 years, 9 months ago (2014-02-27 19:47:41 UTC) #5
jochen (gone - plz use gerrit)
On 2014/02/27 19:38:16, michaeln wrote: > There are cases where the workerthread can block on ...
6 years, 9 months ago (2014-02-27 19:53:39 UTC) #6
jochen (gone - plz use gerrit)
after chatting with Michael, I agree with his description. Esp. this means that moving the ...
6 years, 9 months ago (2014-02-27 20:10:42 UTC) #7
michaeln
lgtm (thnx!)
6 years, 9 months ago (2014-02-27 20:17:59 UTC) #8
jochen (gone - plz use gerrit)
The CQ bit was checked by jochen@chromium.org
6 years, 9 months ago (2014-02-27 20:18:31 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jochen@chromium.org/183093002/10001
6 years, 9 months ago (2014-02-27 20:18:42 UTC) #10
jochen (gone - plz use gerrit)
Committed patchset #2 manually as r168059 (presubmit successful).
6 years, 9 months ago (2014-02-27 22:57:40 UTC) #11
michaeln
Hi jochen, just saw this was merged so i looked again... >> > since closing ...
6 years, 9 months ago (2014-03-05 23:42:51 UTC) #12
jochen (gone - plz use gerrit)
On 2014/03/05 23:42:51, michaeln wrote: > Hi jochen, just saw this was merged so i ...
6 years, 9 months ago (2014-03-10 12:44:35 UTC) #13
michaeln
6 years, 9 months ago (2014-03-10 19:12:53 UTC) #14
Message was sent while issue was closed.
> pumping the DB message loop makes sure that all tasks that schedule stuff on
the
> context thread are executed.
> 
> The context thread blocks on the signal we send after pumping the DB message
> loop, and only after this schedules the delete-v8-task on the context thread.
> 
> So by pumping once, I can make sure that all tasks that access v8 are on the
> context thread's message loop before the context thread posts its
delete-v8-task
> task.
> 
> makes sense?

yes, i think so, thnx for explaining. 

It helps by flushing any newly scheduled db-thread tasks, which can post
context-thread tasks. Doing so guarantees those  content-thread tasks run prior
to delete-v8 task post time (and that's useful for some reason :)

Powered by Google App Engine
This is Rietveld 408576698