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

Issue 2407333002: Remove MessageLoop::current() from rendering_helper.cc. (Closed)

Created:
4 years, 2 months ago by fdoray
Modified:
4 years, 2 months ago
CC:
chromium-reviews, posciak+watch_chromium.org, piman+watch_chromium.org, feature-media-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove MessageLoop::current() from rendering_helper.cc. Whenever possible, use ThreadTaskRunnerHandle::Get() instead of MessageLoop::current(). ThreadTaskRunnerHandle::Get() works within TaskScheduler while MessageLoop::current() doesn't. Good reasons to use MessageLoop::current(): - Add destruction, nesting or task observers. - Run nested loops. Bad reasons to use MessageLoop::current(): - Post tasks. Use ThreadTaskRunnerHandle::Get() instead. - Watch a file descriptor. Use FileDescriptorWatcher instead. - Verify that it is possible to post tasks to the current thread. Use ThreadTaskRunnerHandle::IsSet() instead. - Verify that code runs on a specific thread. Use SingleThreadTaskRunner::BelongsToCurrentThread() instead. BUG=650723 Committed: https://crrev.com/9d97226d3b06bd96e376f6ab6975089a4744b7a7 Cr-Commit-Position: refs/heads/master@{#424497}

Patch Set 1 #

Patch Set 2 : add missing include #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -14 lines) Patch
M media/gpu/rendering_helper.h View 3 chunks +3 lines, -2 lines 0 comments Download
M media/gpu/rendering_helper.cc View 1 11 chunks +13 lines, -12 lines 0 comments Download

Messages

Total messages: 16 (11 generated)
fdoray
PTAL
4 years, 2 months ago (2016-10-11 18:33:44 UTC) #10
sandersd (OOO until July 31)
lgtm
4 years, 2 months ago (2016-10-11 18:35:17 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2407333002/20001
4 years, 2 months ago (2016-10-11 18:36:01 UTC) #13
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 2 months ago (2016-10-11 18:49:18 UTC) #14
commit-bot: I haz the power
4 years, 2 months ago (2016-10-11 18:51:33 UTC) #16
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/9d97226d3b06bd96e376f6ab6975089a4744b7a7
Cr-Commit-Position: refs/heads/master@{#424497}

Powered by Google App Engine
This is Rietveld 408576698