Index: webrtc/base/asyncinvoker.cc |
diff --git a/webrtc/base/asyncinvoker.cc b/webrtc/base/asyncinvoker.cc |
index 35ce2fb12814a60a2e5e976d750ea1fb30f95c07..56f1a19d543bfeecc54b4ef7ffb7abbcb4400847 100644 |
--- a/webrtc/base/asyncinvoker.cc |
+++ b/webrtc/base/asyncinvoker.cc |
@@ -64,6 +64,18 @@ void AsyncInvoker::DoInvoke(Thread* thread, |
thread->Post(this, id, new ScopedRefMessageData<AsyncClosure>(closure)); |
} |
+void AsyncInvoker::DoInvokeDelayed(Thread* thread, |
+ const scoped_refptr<AsyncClosure>& closure, |
+ uint32 delay_ms, |
+ uint32 id) { |
+ if (destroying_) { |
+ LOG(LS_WARNING) << "Tried to invoke while destroying the invoker."; |
+ return; |
+ } |
+ thread->PostDelayed(delay_ms, this, id, |
+ new ScopedRefMessageData<AsyncClosure>(closure)); |
+} |
+ |
NotifyingAsyncClosureBase::NotifyingAsyncClosureBase(AsyncInvoker* invoker, |
Thread* calling_thread) |
: invoker_(invoker), calling_thread_(calling_thread) { |