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

Issue 2365423003: Remove MessageLoop::current() from base::win::ObjectWatcher (reland). (Closed)

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

Description

Remove MessageLoop::current() from base::win::ObjectWatcher (reland). --- This is a reland of https://codereview.chromium.org/2125763003 which was reverted because it broke the Win10 builder. It should not break anything now that TestSimpleTaskRunner is thread-safe (https://codereview.chromium.org/2296923003) --- Why? The fact that there's a MessageLoop on the thread is an unnecessary implementation detail. When browser threads are migrated to base/task_scheduler, tasks will no longer have access to a MessageLoop but they will be able to get the current ThreadTaskRunnerHandle. Before this CL, ObjectWatcher implemented WillDestroyCurrentMessageLoop() to stop the watch when the MessageLoop responsible for running the callback was destroyed. This prevented the watch callback from being sent to a destroyed MessageLoop. Now that ObjectWatcher keeps a reference to a TaskRunner, this is no longer required. The TaskRunner can't be deleted while there are references to it. If the underlying MessageLoop has been deleted when the watch callback is posted, the callback will simply not run. Note that the watch will still be stopped when the ObjectWatcher is deleted. TBR=ben@chromium.org BUG=650318 Committed: https://crrev.com/7b67e033842715d4941d46e726df8ca18d94d768 Cr-Commit-Position: refs/heads/master@{#421179}

Patch Set 1 : same as https://codereview.chromium.org/2125763003 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -50 lines) Patch
M base/files/file_path_watcher_win.cc View 1 chunk +1 line, -0 lines 0 comments Download
M base/process/kill_win.cc View 1 chunk +1 line, -0 lines 0 comments Download
M base/win/object_watcher.h View 3 chunks +25 lines, -16 lines 0 comments Download
M base/win/object_watcher.cc View 6 chunks +20 lines, -34 lines 0 comments Download
M chrome/common/service_process_util_win.cc View 1 chunk +1 line, -0 lines 0 comments Download
M ui/gfx/font_fallback_win.cc View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 17 (11 generated)
fdoray
grt@: PTAL I won't land this before I confirm that the Win10 bots are green.
4 years, 2 months ago (2016-09-26 19:25:47 UTC) #4
grt (UTC plus 2)
still lgtm. thanks.
4 years, 2 months ago (2016-09-26 19:52:36 UTC) #5
fdoray
Thanks! TBR ben@ for missing includes added to various files
4 years, 2 months ago (2016-09-27 12:18:09 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/2365423003/1
4 years, 2 months ago (2016-09-27 12:18:30 UTC) #13
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 2 months ago (2016-09-27 12:23:55 UTC) #15
commit-bot: I haz the power
4 years, 2 months ago (2016-09-27 12:26:13 UTC) #17
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/7b67e033842715d4941d46e726df8ca18d94d768
Cr-Commit-Position: refs/heads/master@{#421179}

Powered by Google App Engine
This is Rietveld 408576698