Commit 78d31c19 authored by Etienne Pierre-doray's avatar Etienne Pierre-doray Committed by Commit Bot

[TaskScheudler]: Migrate off of ScopedAllowWait in /gpu

base::ThreadRestrictions::ScopedAllowWait is deprecated in favor of its more
explicit counterpart.

It should have been replaced by :
 * base::ScopedAllowBaseSyncPrimitivesForTesting in test files.
 * base::ScopedAllowSyncPrimitives in non-test files
 * base::ScopedAllowSyncPrimitivesOutsideBlockingScope when it's used on threads
   that don't allow blocking
The last one is strongly frowned upon but this CL aims to document existing
behavior rather than address it. Owners are encouraged to follow-up by fixing
unnecessary waits and more particularly unnecessary waits
outside-blocking-scope.

Note: The non-for-testing versions require friend'ing in thread_restrictions.h
but care was taken to add these friends ahead of git cl split (since it wasn't
possible to do a line-by-line associated CL split).
Refer to the top-level CL if necessary :
https://chromium-review.googlesource.com/c/chromium/src/+/1288533

Please CQ if LGTY!

This CL was uploaded by git cl split.

R=piman@chromium.org

Bug: 766678
Change-Id: I6f4e77e4d48a29afc52709cf1c1b82ef08be7f98
Reviewed-on: https://chromium-review.googlesource.com/c/1325229Reviewed-by: default avatarAntoine Labour <piman@chromium.org>
Commit-Queue: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606315}
parent b1162aa3
...@@ -90,7 +90,7 @@ bool GpuChannelHost::Send(IPC::Message* msg) { ...@@ -90,7 +90,7 @@ bool GpuChannelHost::Send(IPC::Message* msg) {
std::move(message), &pending_sync)); std::move(message), &pending_sync));
// http://crbug.com/125264 // http://crbug.com/125264
base::ThreadRestrictions::ScopedAllowWait allow_wait; base::ScopedAllowBaseSyncPrimitivesOutsideBlockingScope allow_wait;
pending_sync.done_event->Wait(); pending_sync.done_event->Wait();
return pending_sync.send_result; return pending_sync.send_result;
......
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