| Index: webrtc/base/task_queue.h
|
| diff --git a/webrtc/base/task_queue.h b/webrtc/base/task_queue.h
|
| index a6a70364ac4a19df27e28a2580efdeca6568f393..bfa0c3d167277e3a18267b5314bb6aba71824889 100644
|
| --- a/webrtc/base/task_queue.h
|
| +++ b/webrtc/base/task_queue.h
|
| @@ -27,6 +27,9 @@
|
| #endif
|
|
|
| #if defined(WEBRTC_BUILD_LIBEVENT)
|
| +#include "webrtc/base/refcountedobject.h"
|
| +#include "webrtc/base/scoped_ref_ptr.h"
|
| +
|
| struct event_base;
|
| struct event;
|
| #endif
|
| @@ -237,11 +240,13 @@ class LOCKABLE TaskQueue {
|
| static void RunTask(int fd, short flags, void* context); // NOLINT
|
| static void RunTimer(int fd, short flags, void* context); // NOLINT
|
|
|
| + class ReplyTaskOwner;
|
| class PostAndReplyTask;
|
| class SetTimerTask;
|
|
|
| - void PrepareReplyTask(PostAndReplyTask* reply_task);
|
| - void ReplyTaskDone(PostAndReplyTask* reply_task);
|
| + typedef RefCountedObject<ReplyTaskOwner> ReplyTaskOwnerRef;
|
| +
|
| + void PrepareReplyTask(scoped_refptr<ReplyTaskOwnerRef> reply_task);
|
|
|
| struct QueueContext;
|
|
|
| @@ -252,7 +257,8 @@ class LOCKABLE TaskQueue {
|
| PlatformThread thread_;
|
| rtc::CriticalSection pending_lock_;
|
| std::list<std::unique_ptr<QueuedTask>> pending_ GUARDED_BY(pending_lock_);
|
| - std::list<PostAndReplyTask*> pending_replies_ GUARDED_BY(pending_lock_);
|
| + std::list<scoped_refptr<ReplyTaskOwnerRef>> pending_replies_
|
| + GUARDED_BY(pending_lock_);
|
| #elif defined(WEBRTC_MAC)
|
| struct QueueContext;
|
| struct TaskContext;
|
|
|