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

Issue 2405273002: Remove MessageLoop::current() from socket_host_tcp.cc. (Closed)

Created:
4 years, 2 months ago by fdoray
Modified:
4 years, 2 months ago
Reviewers:
Sergey Ulanov
CC:
chromium-reviews, jam, darin-cc_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove MessageLoop::current() from socket_host_tcp.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/58cdcc5798f592aa748d73952b6fc785d7164666 Cr-Commit-Position: refs/heads/master@{#424718}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -4 lines) Patch
M content/browser/renderer_host/p2p/socket_host_tcp.h View 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/renderer_host/p2p/socket_host_tcp.cc View 2 chunks +2 lines, -3 lines 0 comments Download

Messages

Total messages: 12 (7 generated)
fdoray
PTAL
4 years, 2 months ago (2016-10-11 19:42:42 UTC) #4
Sergey Ulanov
lgtm
4 years, 2 months ago (2016-10-11 20:13:17 UTC) #5
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/2405273002/1
4 years, 2 months ago (2016-10-12 12:07:59 UTC) #9
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 2 months ago (2016-10-12 12:13:22 UTC) #10
commit-bot: I haz the power
4 years, 2 months ago (2016-10-12 12:15:01 UTC) #12
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/58cdcc5798f592aa748d73952b6fc785d7164666
Cr-Commit-Position: refs/heads/master@{#424718}

Powered by Google App Engine
This is Rietveld 408576698