DescriptionRevert of Remove MessageLoop::current() from base::win::ObjectWatcher. (patchset #5 id:80001 of https://codereview.chromium.org/2125763003/ )
Reason for revert:
Breaks Win10 builder. crbug.com/632184
Original issue's description:
> Remove MessageLoop::current() from base::win::ObjectWatcher.
>
> 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=616447
>
> Committed: https://crrev.com/76db1513714741d8d6e6dd6e872d50f20b090fce
> Cr-Commit-Position: refs/heads/master@{#407874}
TBR=grt@chromium.org,ben@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=616447
Committed: https://crrev.com/00108e0c668b75d9416d50852176ce39c5454e2d
Cr-Commit-Position: refs/heads/master@{#414465}
Patch Set 1 #
Messages
Total messages: 6 (2 generated)
|