add racy RPC resolution. also add better debugging info and fix two shared-memory-race bugs.

This commit is contained in:
Chris Jones
2009-10-08 16:44:43 -05:00
parent 7de7fb42d9
commit 2ee72bbdde
6 changed files with 173 additions and 43 deletions

View File

@@ -62,12 +62,12 @@ SyncChannel::Send(Message* msg, Message* reply)
"violation of sync handler invariant");
NS_ABORT_IF_FALSE(msg->is_sync(), "can only Send() sync messages here");
MutexAutoLock lock(mMutex);
if (!Connected())
// trying to Send() to a closed or error'd channel
return false;
MutexAutoLock lock(mMutex);
mPendingReply = msg->type() + 1;
if (!AsyncChannel::Send(msg))
// FIXME more sophisticated error handling