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

Issue 8747002: Dispatch IndexedDB IPC messages to worker threads (Closed)

Created:
9 years ago by dgrogan
Modified:
9 years ago
Reviewers:
michaeln, hans, jam, jsbell
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, dpranke-watch+content_chromium.org
Visibility:
Public.

Description

Async IDB host messages now contain a thread_id corresponding to the requesting thread. The id is 0 for the main thread and >0 for worker threads. The browser process includes the thread_id in its reply, allowing the IO thread in the renderer to look up the right worker thread. BUG=64054 TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=114747

Patch Set 1 #

Total comments: 31

Patch Set 2 : rebase off http://codereview.chromium.org/8745003/ #

Patch Set 3 : address Hans' comments #

Patch Set 4 : re-rebase off http://codereview.chromium.org/8745003/ #

Total comments: 6

Patch Set 5 : few small fixes #

Patch Set 6 : WorkerTaskRunner extracted #

Patch Set 7 : inject thread ids into ipcs #

Total comments: 15

Patch Set 8 : addressed most things #

Patch Set 9 : rebase from trunk #

Patch Set 10 : fix errors found by try bot #

Patch Set 11 : move message_filter to common, fix other include problems #

Patch Set 12 : make clang plugin happy #

Patch Set 13 : mv indexed_db_message_filter.cc to content/renderer to satisfy checkdeps #

Patch Set 14 : repurpose obsolete indexed-db switch to control idb on workers #

Total comments: 1

Patch Set 15 : dropped the commandline stuff #

Patch Set 16 : moved worker tracking portion to http://codereview.chromium.org/8785013 #

Patch Set 17 : small cleanups #

Patch Set 18 : small cleanup #

Patch Set 19 : work with latest WorkerTaskRunner #

Patch Set 20 : add thread id to IPCs; slim down IDBMessageFilter #

Patch Set 21 : style improvements #

Patch Set 22 : remove some includes #

Total comments: 23

Patch Set 23 : rebase onto ToT #

Patch Set 24 : fix clang-enforced style violations #

Total comments: 4

Patch Set 25 : address comments #

Patch Set 26 : fix typo #

Patch Set 27 : move IDBMessageFilter to content/renderer #

Patch Set 28 : make RenderThreadImpl own mainthread's idb dispatcher #

Total comments: 3

Patch Set 29 : move tls management to ctor/dtor #

Patch Set 30 : remove init #

Patch Set 31 : remove changes to content_common.gypi #

Patch Set 32 : remove OVERRIDE from dtor #

Unified diffs Side-by-side diffs Delta from patch set Stats (+506 lines, -222 lines) Patch
M content/browser/in_process_webkit/indexed_db_callbacks.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 7 chunks +28 lines, -15 lines 0 comments Download
M content/browser/in_process_webkit/indexed_db_callbacks.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 4 chunks +34 lines, -23 lines 0 comments Download
M content/browser/in_process_webkit/indexed_db_database_callbacks.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/in_process_webkit/indexed_db_database_callbacks.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +4 lines, -2 lines 0 comments Download
M content/browser/in_process_webkit/indexed_db_dispatcher_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 6 chunks +19 lines, -4 lines 0 comments Download
M content/browser/in_process_webkit/indexed_db_dispatcher_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 26 chunks +50 lines, -22 lines 0 comments Download
M content/browser/in_process_webkit/indexed_db_transaction_callbacks.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/in_process_webkit/indexed_db_transaction_callbacks.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +5 lines, -2 lines 0 comments Download
M content/common/indexed_db_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 15 chunks +96 lines, -45 lines 0 comments Download
M content/content_renderer.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/indexed_db_dispatcher.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 3 chunks +45 lines, -29 lines 0 comments Download
M content/renderer/indexed_db_dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 34 chunks +121 lines, -47 lines 0 comments Download
A content/renderer/indexed_db_message_filter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 1 chunk +28 lines, -0 lines 0 comments Download
A content/renderer/indexed_db_message_filter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +37 lines, -0 lines 0 comments Download
M content/renderer/render_thread_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 2 chunks +1 line, -5 lines 0 comments Download
M content/renderer/render_thread_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 4 chunks +5 lines, -3 lines 0 comments Download
M content/renderer/renderer_webidbcursor_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 5 chunks +5 lines, -5 lines 0 comments Download
M content/renderer/renderer_webidbdatabase_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 5 chunks +9 lines, -7 lines 0 comments Download
M content/renderer/renderer_webidbfactory_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 3 chunks +3 lines, -3 lines 0 comments Download
M content/renderer/renderer_webidbindex_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 4 chunks +4 lines, -4 lines 0 comments Download
M content/renderer/renderer_webidbobjectstore_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 5 chunks +5 lines, -5 lines 0 comments Download
M content/renderer/renderer_webidbtransaction_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 29 (0 generated)
dgrogan
This is the mega patch. I'm going to see how much I can break off ...
9 years ago (2011-11-30 03:11:56 UTC) #1
hans
Looks fine as far as I can tell, but Michael should review as well. Just ...
9 years ago (2011-11-30 15:05:40 UTC) #2
dgrogan
http://codereview.chromium.org/8747002/diff/1/content/renderer/indexed_db_dispatcher.h File content/renderer/indexed_db_dispatcher.h (right): http://codereview.chromium.org/8747002/diff/1/content/renderer/indexed_db_dispatcher.h#newcode195 content/renderer/indexed_db_dispatcher.h:195: // * Ensures, through IDMap, that it is only ...
9 years ago (2011-11-30 21:34:35 UTC) #3
michaeln
http://codereview.chromium.org/8747002/diff/1/content/renderer/indexed_db_dispatcher.h File content/renderer/indexed_db_dispatcher.h (right): http://codereview.chromium.org/8747002/diff/1/content/renderer/indexed_db_dispatcher.h#newcode195 content/renderer/indexed_db_dispatcher.h:195: // * Ensures, through IDMap, that it is only ...
9 years ago (2011-11-30 21:48:14 UTC) #4
michaeln
http://codereview.chromium.org/8747002/diff/15001/content/renderer/indexed_db_message_filter.cc File content/renderer/indexed_db_message_filter.cc (right): http://codereview.chromium.org/8747002/diff/15001/content/renderer/indexed_db_message_filter.cc#newcode71 content/renderer/indexed_db_message_filter.cc:71: bool IndexedDBMessageFilter::OnMessageReceived(const IPC::Message& msg) { If the workerId could ...
9 years ago (2011-11-30 22:40:55 UTC) #5
dgrogan
New patch with just a few of the trivial fixes. I'll start separating WorkerTaskRunner from ...
9 years ago (2011-11-30 23:25:18 UTC) #6
michaeln
> Not yet sure if I'm going to get rid of the maps that associate ...
9 years ago (2011-11-30 23:51:35 UTC) #7
dgrogan
On 2011/11/30 23:51:35, michaeln wrote: > > I'll start separating WorkerTaskRunner from IDBMessageFilter, and add ...
9 years ago (2011-11-30 23:56:33 UTC) #8
michaeln
>> notifies when workers are started and stopped > > If you used TLS for ...
9 years ago (2011-12-01 00:01:59 UTC) #9
michaeln
http://codereview.chromium.org/8747002/diff/12032/content/common/worker_task_runner.h File content/common/worker_task_runner.h (right): http://codereview.chromium.org/8747002/diff/12032/content/common/worker_task_runner.h#newcode20 content/common/worker_task_runner.h:20: class WorkerTaskRunner : public base::RefCountedThreadSafe<WorkerTaskRunner> { why refcounted? http://codereview.chromium.org/8747002/diff/12032/content/common/worker_task_runner.h#newcode63 ...
9 years ago (2011-12-01 21:42:05 UTC) #10
dgrogan
http://codereview.chromium.org/8747002/diff/12032/content/common/worker_task_runner.h File content/common/worker_task_runner.h (right): http://codereview.chromium.org/8747002/diff/12032/content/common/worker_task_runner.h#newcode20 content/common/worker_task_runner.h:20: class WorkerTaskRunner : public base::RefCountedThreadSafe<WorkerTaskRunner> { On 2011/12/01 21:42:05, ...
9 years ago (2011-12-01 22:49:00 UTC) #11
michaeln
http://codereview.chromium.org/8747002/diff/12032/content/common/worker_task_runner.h File content/common/worker_task_runner.h (right): http://codereview.chromium.org/8747002/diff/12032/content/common/worker_task_runner.h#newcode20 content/common/worker_task_runner.h:20: class WorkerTaskRunner : public base::RefCountedThreadSafe<WorkerTaskRunner> { On 2011/12/01 22:49:00, ...
9 years ago (2011-12-02 00:15:02 UTC) #12
dgrogan
I think this is mostly complete. I tried to rework how transaction callback ids are ...
9 years ago (2011-12-02 00:50:15 UTC) #13
dgrogan
http://codereview.chromium.org/8747002/diff/12032/content/common/worker_task_runner.h File content/common/worker_task_runner.h (right): http://codereview.chromium.org/8747002/diff/12032/content/common/worker_task_runner.h#newcode20 content/common/worker_task_runner.h:20: class WorkerTaskRunner : public base::RefCountedThreadSafe<WorkerTaskRunner> { On 2011/12/02 00:15:03, ...
9 years ago (2011-12-02 11:57:44 UTC) #14
dgrogan
On 2011/12/02 00:15:02, michaeln wrote: > http://codereview.chromium.org/8747002/diff/12032/content/common/worker_task_runner.h > File content/common/worker_task_runner.h (right): > > http://codereview.chromium.org/8747002/diff/12032/content/common/worker_task_runner.h#newcode20 > ...
9 years ago (2011-12-02 21:35:56 UTC) #15
dgrogan
John, could you take a look at this, at least as OWNER of content/public? This ...
9 years ago (2011-12-02 21:40:21 UTC) #16
jam
Can you break this up into smaller pieces? This will make it much easier to ...
9 years ago (2011-12-02 23:56:14 UTC) #17
dgrogan
On 2011/12/02 23:56:14, John Abd-El-Malek wrote: > Can you break this up into smaller pieces? ...
9 years ago (2011-12-03 00:14:19 UTC) #18
jam
On 2011/12/03 00:14:19, dgrogan wrote: > On 2011/12/02 23:56:14, John Abd-El-Malek wrote: > > Can ...
9 years ago (2011-12-03 00:25:18 UTC) #19
dgrogan
Hans, Josh and Michael, This has been revamped and could use another look.
9 years ago (2011-12-14 01:46:15 UTC) #20
michaeln
i like the looks of the new CL, the lean and mean MessageFilter class is ...
9 years ago (2011-12-14 02:15:53 UTC) #21
jsbell
Overall LGTM. I concur with michaeln@'s comments, especially that additional documentation in indexed_db_messages.h indicating which ...
9 years ago (2011-12-15 00:08:42 UTC) #22
jam
(didn't review in detail) indexed_db_message_filter.h and indexed_db_message_filter.cc need to be in the same directory. i ...
9 years ago (2011-12-15 01:20:09 UTC) #23
michaeln
http://codereview.chromium.org/8747002/diff/57002/content/renderer/indexed_db_dispatcher.cc File content/renderer/indexed_db_dispatcher.cc (right): http://codereview.chromium.org/8747002/diff/57002/content/renderer/indexed_db_dispatcher.cc#newcode65 content/renderer/indexed_db_dispatcher.cc:65: g_idb_dispatcher_tls.Pointer()->Set(NULL); consider putting this line in the dtor so ...
9 years ago (2011-12-15 02:20:47 UTC) #24
dgrogan
I think I addressed everything, including putting the IDBDispatcher's tls stuff in the ctor/dtor. I ...
9 years ago (2011-12-15 02:47:44 UTC) #25
michaeln
LGTM2
9 years ago (2011-12-15 20:55:09 UTC) #26
jam
I didn't really review this in detail, but I had scanned it earlier and the ...
9 years ago (2011-12-15 23:41:14 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dgrogan@chromium.org/8747002/70001
9 years ago (2011-12-16 00:21:59 UTC) #28
commit-bot: I haz the power
9 years ago (2011-12-16 02:04:41 UTC) #29
Change committed as 114747

Powered by Google App Engine
This is Rietveld 408576698