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

Issue 1206893003: base: Make it possible to replace the MessageLoop's task runner (Closed)

Created:
5 years, 6 months ago by alex clarke (OOO till 29th)
Modified:
5 years, 5 months ago
Reviewers:
kinuko, danakj, jam
CC:
chromium-reviews, feature-media-reviews_chromium.org, erikwright+watch_chromium.org, sadrul
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

base: Make it possible to replace the MessageLoop's task runner This patch makes it possible to customize the task posting behavior of a MessageLoop. More specifically, a client can change the value returned by MessageLoop::task_runner() as well as ThreadTaskRunnerHandle::Get() on the target thread. The original task runner can still be used to post tasks to be run on the message loop. The Blink/renderer scheduler will use this functionality to manage task posting on the renderer main thread. This is needed to ensure consistent ordering of tasks posted through the MessageLoop w.r.t. tasks posted to the scheduler. Design doc: https://docs.google.com/a/chromium.org/document/d/1qxdh2I61_aB_Uzh1QgNqvdWFBCL_E65G2smoSySw7KU/edit# Origional patch by Sami Kyostila: https://codereview.chromium.org/998063002/ BUG=465354

Patch Set 1 #

Patch Set 2 : Perhaps it's clearer to use swap? #

Patch Set 3 : The reset was needed #

Total comments: 18

Patch Set 4 : Trying to address feedback #

Patch Set 5 : Change in media/blink/webmediaplayer_impl.cc is not needed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+138 lines, -14 lines) Patch
M base/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M base/base.gypi View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
A base/message_loop/bindable_single_thread_task_runner.h View 1 2 3 1 chunk +27 lines, -0 lines 0 comments Download
M base/message_loop/message_loop.h View 1 2 3 5 chunks +15 lines, -4 lines 0 comments Download
M base/message_loop/message_loop.cc View 1 2 3 2 chunks +20 lines, -1 line 0 comments Download
M base/message_loop/message_loop_task_runner.h View 2 chunks +8 lines, -9 lines 0 comments Download
M base/message_loop/message_loop_unittest.cc View 2 chunks +66 lines, -0 lines 0 comments Download

Messages

Total messages: 21 (7 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1206893003/1
5 years, 6 months ago (2015-06-24 15:43:42 UTC) #2
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 6 months ago (2015-06-24 18:29:05 UTC) #4
alex clarke (OOO till 29th)
Sami is on vacation. And I'm hoping to get this patch landed on his behalf. ...
5 years, 6 months ago (2015-06-25 10:58:59 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1206893003/20001
5 years, 6 months ago (2015-06-25 11:04:15 UTC) #8
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: cast_shell_linux on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/24293)
5 years, 6 months ago (2015-06-25 11:43:57 UTC) #10
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1206893003/40001
5 years, 6 months ago (2015-06-25 13:04:13 UTC) #12
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 6 months ago (2015-06-25 14:41:30 UTC) #14
alex clarke (OOO till 29th)
Ping :)
5 years, 5 months ago (2015-06-29 17:21:29 UTC) #15
danakj
https://codereview.chromium.org/1206893003/diff/40001/base/message_loop/bindable_single_thread_task_runner.h File base/message_loop/bindable_single_thread_task_runner.h (right): https://codereview.chromium.org/1206893003/diff/40001/base/message_loop/bindable_single_thread_task_runner.h#newcode12 base/message_loop/bindable_single_thread_task_runner.h:12: // A SingleThreadTaskRunner which can be bound to a ...
5 years, 5 months ago (2015-06-29 19:07:23 UTC) #16
danakj
https://codereview.chromium.org/1206893003/diff/40001/base/message_loop/message_loop.h File base/message_loop/message_loop.h (right): https://codereview.chromium.org/1206893003/diff/40001/base/message_loop/message_loop.h#newcode301 base/message_loop/message_loop.h:301: scoped_refptr<BindableSingleThreadTaskRunner> task_runner() { On 2015/06/29 19:07:23, danakj OOO back ...
5 years, 5 months ago (2015-06-29 19:09:06 UTC) #17
kinuko
https://codereview.chromium.org/1206893003/diff/40001/base/message_loop/message_loop.h File base/message_loop/message_loop.h (right): https://codereview.chromium.org/1206893003/diff/40001/base/message_loop/message_loop.h#newcode311 base/message_loop/message_loop.h:311: scoped_refptr<BindableSingleThreadTaskRunner> task_runner); Would we want to call this before ...
5 years, 5 months ago (2015-06-30 02:26:56 UTC) #18
alex clarke (OOO till 29th)
PTAL https://codereview.chromium.org/1206893003/diff/40001/base/message_loop/bindable_single_thread_task_runner.h File base/message_loop/bindable_single_thread_task_runner.h (right): https://codereview.chromium.org/1206893003/diff/40001/base/message_loop/bindable_single_thread_task_runner.h#newcode12 base/message_loop/bindable_single_thread_task_runner.h:12: // A SingleThreadTaskRunner which can be bound to ...
5 years, 5 months ago (2015-06-30 10:51:44 UTC) #19
alex clarke (OOO till 29th)
PING :)
5 years, 5 months ago (2015-07-02 13:25:49 UTC) #20
Sami
5 years, 5 months ago (2015-07-07 13:11:10 UTC) #21
Thanks for shepherding this while I was away Alex. Since Rietveld doesn't let
you transfer code reviews between accounts, I'll just resume the original review
and respond to the comments there: https://codereview.chromium.org/998063002/

Powered by Google App Engine
This is Rietveld 408576698