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

[TaskScheduler]: Migrate off of ScopedAllowWait in /mojo

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=sky@chromium.org

Bug: 766678
Change-Id: Id08163a2526a0583da8fee44893b952945b6371d
Reviewed-on: https://chromium-review.googlesource.com/c/1325189Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606561}
parent a5f8582f
...@@ -113,7 +113,7 @@ class MOJO_CPP_BINDINGS_EXPORT SyncCallRestrictions { ...@@ -113,7 +113,7 @@ class MOJO_CPP_BINDINGS_EXPORT SyncCallRestrictions {
private: private:
#if ENABLE_SYNC_CALL_RESTRICTIONS #if ENABLE_SYNC_CALL_RESTRICTIONS
base::ThreadRestrictions::ScopedAllowWait allow_wait_; base::ScopedAllowBaseSyncPrimitivesOutsideBlockingScope allow_wait_;
#endif #endif
DISALLOW_COPY_AND_ASSIGN(ScopedAllowSyncCall); DISALLOW_COPY_AND_ASSIGN(ScopedAllowSyncCall);
......
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