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

[TaskScheduler]: Migrate off of ScopedAllowWait in...

[TaskScheduler]: Migrate off of ScopedAllowWait in /content/browser/renderer_host/text_input_client_mac.mm

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

It should have been replaced by :
 * base::ScopedAllowBaseSyncPrimitivesForTesting in test files.
 * base::ScopedAllowBaseSyncPrimitives in non-test files
 * base::ScopedAllowBaseSyncPrimitivesOutsideBlockingScope 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=ellyjones@chromium.org

Bug: 766678
Change-Id: I39a4449295407eaf1016cbfdb1e5b8842f1dda7c
Reviewed-on: https://chromium-review.googlesource.com/c/1325206Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609808}
parent c4d5888d
......@@ -106,7 +106,7 @@ uint32_t TextInputClientMac::GetCharacterIndexAtPoint(RenderWidgetHost* rwh,
BeforeRequest();
// http://crbug.com/121917
base::ThreadRestrictions::ScopedAllowWait allow_wait;
base::ScopedAllowBaseSyncPrimitives allow_wait;
condition_.TimedWait(base::TimeDelta::FromMilliseconds(kWaitTimeout));
AfterRequest();
......@@ -131,7 +131,7 @@ gfx::Rect TextInputClientMac::GetFirstRectForRange(RenderWidgetHost* rwh,
BeforeRequest();
// http://crbug.com/121917
base::ThreadRestrictions::ScopedAllowWait allow_wait;
base::ScopedAllowBaseSyncPrimitives allow_wait;
condition_.TimedWait(base::TimeDelta::FromMilliseconds(kWaitTimeout));
AfterRequest();
......
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