| Index: content/child/shared_memory_data_consumer_handle.cc
|
| diff --git a/content/child/shared_memory_data_consumer_handle.cc b/content/child/shared_memory_data_consumer_handle.cc
|
| index f11435ada87c22572379c59ce9b80f2e50c85b44..7206ca6ee7b0103520008c129a5e4da1a0fc378b 100644
|
| --- a/content/child/shared_memory_data_consumer_handle.cc
|
| +++ b/content/child/shared_memory_data_consumer_handle.cc
|
| @@ -104,7 +104,11 @@ class SharedMemoryDataConsumerHandle::Context final
|
| client_ = nullptr;
|
| }
|
| void PostNotify() {
|
| - auto runner = notification_task_runner_;
|
| + scoped_refptr<base::SingleThreadTaskRunner> runner;
|
| + {
|
| + base::AutoLock lock(lock_);
|
| + runner = notification_task_runner_;
|
| + }
|
| if (!runner)
|
| return;
|
| // We don't re-post the task when the runner changes while waiting for
|
| @@ -160,7 +164,11 @@ class SharedMemoryDataConsumerHandle::Context final
|
| void NotifyInternal(bool repost) {
|
| // Note that this function is not protected by |lock_|.
|
|
|
| - auto runner = notification_task_runner_;
|
| + scoped_refptr<base::SingleThreadTaskRunner> runner;
|
| + {
|
| + base::AutoLock lock(lock_);
|
| + runner = notification_task_runner_;
|
| + }
|
| if (!runner)
|
| return;
|
|
|
|
|