Update talk to 52534915.

R=sergeyu@chromium.org

Review URL: https://webrtc-codereview.appspot.com/2251004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4786 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
wu@webrtc.org
2013-09-19 05:49:50 +00:00
parent 532f3dc548
commit 967bfff54d
44 changed files with 647 additions and 199 deletions

View File

@@ -1265,7 +1265,14 @@ void PhysicalSocketServer::Remove(Dispatcher *pdispatcher) {
DispatcherList::iterator pos = std::find(dispatchers_.begin(),
dispatchers_.end(),
pdispatcher);
ASSERT(pos != dispatchers_.end());
// We silently ignore duplicate calls to Add, so we should silently ignore
// the (expected) symmetric calls to Remove. Note that this may still hide
// a real issue, so we at least log a warning about it.
if (pos == dispatchers_.end()) {
LOG(LS_WARNING) << "PhysicalSocketServer asked to remove a unknown "
<< "dispatcher, potentially from a duplicate call to Add.";
return;
}
size_t index = pos - dispatchers_.begin();
dispatchers_.erase(pos);
for (IteratorList::iterator it = iterators_.begin(); it != iterators_.end();