| Index: webrtc/base/asyncinvoker.cc
|
| diff --git a/webrtc/base/asyncinvoker.cc b/webrtc/base/asyncinvoker.cc
|
| index a143e25f19341bd2d3368c991aca8ab9c1e4d418..cabd8b506d0575ee3e3b41a479f6f7b9fcf63ee8 100644
|
| --- a/webrtc/base/asyncinvoker.cc
|
| +++ b/webrtc/base/asyncinvoker.cc
|
| @@ -20,7 +20,6 @@ AsyncInvoker::AsyncInvoker() : invocation_complete_(false, false) {}
|
|
|
| AsyncInvoker::~AsyncInvoker() {
|
| destroying_ = true;
|
| - SignalInvokerDestroyed();
|
| // Messages for this need to be cleared *before* our destructor is complete.
|
| MessageQueueManager::Clear(this);
|
| // And we need to wait for any invocations that are still in progress on
|
| @@ -126,8 +125,9 @@ NotifyingAsyncClosureBase::NotifyingAsyncClosureBase(
|
| calling_thread_(calling_thread) {
|
| calling_thread->SignalQueueDestroyed.connect(
|
| this, &NotifyingAsyncClosureBase::CancelCallback);
|
| - invoker->SignalInvokerDestroyed.connect(
|
| - this, &NotifyingAsyncClosureBase::CancelCallback);
|
| + // Note: We don't need to listen for the invoker being destroyed, because it
|
| + // will wait for this closure to be destroyed (and pending_invocations_ to go
|
| + // to 0) before its destructor completes.
|
| }
|
|
|
| NotifyingAsyncClosureBase::~NotifyingAsyncClosureBase() {
|
|
|