Commit 1e1792c4 authored by Etienne Pierre-Doray's avatar Etienne Pierre-Doray Committed by Commit Bot

[TaskScheduler]: Remove unecessary ScopedAllowWait in MessagePump.

SyncWaiter::sw needs to be declared only used while idle in WaitableEvent
to avoid being considered blocking.

Bug: 847501
Change-Id: I9a70aa28e74dbaae5f4b1b8aa66bb27ed0b5ee28
Reviewed-on: https://chromium-review.googlesource.com/c/1349730Reviewed-by: default avatarFrançois Doray <fdoray@chromium.org>
Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611146}
parent cae4359a
......@@ -54,7 +54,6 @@ void MessagePumpDefault::Run(Delegate* delegate) {
if (did_work)
continue;
ThreadRestrictions::ScopedAllowWait allow_wait;
if (delayed_work_time_.is_null()) {
event_.Wait();
} else {
......
......@@ -189,6 +189,8 @@ bool WaitableEvent::TimedWaitUntil(const TimeTicks& end_time) {
}
SyncWaiter sw;
if (!waiting_is_blocking_)
sw.cv()->declare_only_used_while_idle();
sw.lock()->Acquire();
Enqueue(&sw);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment