| Index: base/message_loop/incoming_task_queue.h
|
| diff --git a/base/message_loop/incoming_task_queue.h b/base/message_loop/incoming_task_queue.h
|
| index 608eca0bbda1cb31ff13fdfcd6000d19c94188b3..aff71d20bf8b3a13b8270123ec3b0ca11cc6089d 100644
|
| --- a/base/message_loop/incoming_task_queue.h
|
| +++ b/base/message_loop/incoming_task_queue.h
|
| @@ -10,6 +10,7 @@
|
| #include "base/memory/ref_counted.h"
|
| #include "base/pending_task.h"
|
| #include "base/synchronization/lock.h"
|
| +#include "base/synchronization/read_write_lock.h"
|
| #include "base/time/time.h"
|
|
|
| namespace base {
|
| @@ -75,9 +76,14 @@ class BASE_EXPORT IncomingTaskQueue
|
| // so that ReloadWorkQueue() completes in constant time.
|
| int high_res_task_count_;
|
|
|
| - // The lock that protects access to the members of this class.
|
| + // The lock that protects access to the members of this class, except
|
| + // |message_loop_|.
|
| base::Lock incoming_queue_lock_;
|
|
|
| + // Lock that protects |message_loop_| to prevent it from being deleted while a
|
| + // task is being posted.
|
| + base::subtle::ReadWriteLock message_loop_lock_;
|
| +
|
| // An incoming queue of tasks that are acquired under a mutex for processing
|
| // on this instance's thread. These tasks have not yet been been pushed to
|
| // |message_loop_|.
|
|
|