| Index: third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h
|
| diff --git a/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h b/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h
|
| index 6b4305ea49243ada10b507e7e5e4814f9983a4b9..6be58654fb5b9a87041a2b3c1a89d1b667699b05 100644
|
| --- a/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h
|
| +++ b/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h
|
| @@ -246,9 +246,25 @@ class BLINK_PLATFORM_EXPORT TaskQueueManager
|
| // the main thread and other threads.
|
| std::set<base::TimeTicks> main_thread_pending_wakeups_;
|
|
|
| - // Protects |other_thread_pending_wakeup_|.
|
| - mutable base::Lock other_thread_lock_;
|
| - bool other_thread_pending_wakeup_;
|
| + struct AnyThread {
|
| + AnyThread();
|
| +
|
| + bool other_thread_pending_wakeup;
|
| + };
|
| +
|
| + // TODO(alexclarke): Add a MainThreadOnly struct too.
|
| +
|
| + mutable base::Lock any_thread_lock_;
|
| + AnyThread any_thread_;
|
| +
|
| + struct AnyThread& any_thread() {
|
| + any_thread_lock_.AssertAcquired();
|
| + return any_thread_;
|
| + }
|
| + const struct AnyThread& any_thread() const {
|
| + any_thread_lock_.AssertAcquired();
|
| + return any_thread_;
|
| + }
|
|
|
| bool record_task_delay_histograms_;
|
|
|
|
|