summaryrefslogtreecommitdiffstats
path: root/jingle/glue/thread_wrapper.cc
diff options
context:
space:
mode:
Diffstat (limited to 'jingle/glue/thread_wrapper.cc')
-rw-r--r--jingle/glue/thread_wrapper.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/jingle/glue/thread_wrapper.cc b/jingle/glue/thread_wrapper.cc
index fe26094..979064b 100644
--- a/jingle/glue/thread_wrapper.cc
+++ b/jingle/glue/thread_wrapper.cc
@@ -30,6 +30,7 @@ JingleThreadWrapper::JingleThreadWrapper(MessageLoop* message_loop)
DCHECK_EQ(message_loop_, MessageLoop::current());
talk_base::ThreadManager::SetCurrent(this);
+ talk_base::MessageQueueManager::Instance()->Add(this);
message_loop_->AddDestructionObserver(this);
}
@@ -38,6 +39,7 @@ JingleThreadWrapper::~JingleThreadWrapper() {
void JingleThreadWrapper::WillDestroyCurrentMessageLoop() {
talk_base::ThreadManager::SetCurrent(NULL);
+ talk_base::MessageQueueManager::Instance()->Remove(this);
message_loop_->RemoveDestructionObserver(this);
delete this;
}