commit | c1ee639a707d712bd40c4c704a6ddd21f6846b7a | [log] [tgz] |
---|---|---|
author | Yuta Kitamura <yutak@chromium.org> | Fri May 18 10:45:28 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Fri May 18 10:45:28 2018 |
tree | 9c6488980d487e10da26d78b64f49b0f6c7e698e | |
parent | 91a96f15d50475e36511ecf5317107d7f0ffb927 [diff] |
Add (NonMain)ThreadScheduler::Current(). The function returns the current thread's instance of ThreadScheduler. This is an alias of the "Platform::Current()->CurrentThread() ->Scheduler()" idiom which is currently widely used in Blink, and all such calls will be replaced with the shorter "ThreadScheduler ::Current()" call in the future. This patch also adds similar NonMainThreadScheduler::Current(), which DCHECKs the caller is on the right thread. When we add MainThreadScheduler in the future (this is likely to happen), it will also have the similar Current() function. Bug: 826203 Change-Id: Iaba856ff37cb81a33cbdf4b558764ab5634adf84 Reviewed-on: https://chromium-review.googlesource.com/1065538 Reviewed-by: Alexander Timin <altimin@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Commit-Queue: Yuta Kitamura <yutak@chromium.org> Cr-Commit-Position: refs/heads/master@{#559857}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .