From 4f3fa55836176d9b98cdf118c9b6520fca0e6561 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Wed, 27 Jan 2010 02:17:17 -0600 Subject: [PATCH] Follow-up to bug 540886: address review comments I forgot to before pushing. --HG-- extra : transplant_source : a%25%DF%90g%8A%F0%5C%F7%9B%BEtX%13p9%3Fq%E8%E2 --- ipc/glue/AsyncChannel.cpp | 1 + ipc/glue/RPCChannel.cpp | 9 ++------- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/ipc/glue/AsyncChannel.cpp b/ipc/glue/AsyncChannel.cpp index b016a686758..5010053fdb8 100644 --- a/ipc/glue/AsyncChannel.cpp +++ b/ipc/glue/AsyncChannel.cpp @@ -91,6 +91,7 @@ AsyncChannel::AsyncChannel(AsyncListener* aListener) mCvar(mMutex, "mozilla.ipc.AsyncChannel.mCvar"), mIOLoop(), mWorkerLoop(), + mChild(false), mChannelErrorTask(NULL) { MOZ_COUNT_CTOR(AsyncChannel); diff --git a/ipc/glue/RPCChannel.cpp b/ipc/glue/RPCChannel.cpp index b0aede05389..ee5ac0b8a41 100644 --- a/ipc/glue/RPCChannel.cpp +++ b/ipc/glue/RPCChannel.cpp @@ -471,7 +471,7 @@ RPCChannel::BlockOnParent() NS_RUNTIMEABORT("attempt to block child when it's already blocked"); mBlockedOnParent = true; - while (1) { + do { // XXX this dispatch loop shares some similarities with the // one in Call(), but the logic is simpler and different // enough IMHO to warrant its own dispatch loop @@ -501,12 +501,7 @@ RPCChannel::BlockOnParent() AsyncChannel::OnDispatchMessage(recvd); } } - - // the last message, if async, may have been the one that - // unblocks us - if (!mBlockedOnParent) - break; - } + } while (mBlockedOnParent); EnqueuePendingMessages(); }