Bug 554466: Only EnqueuePending when there's been an rpc out-call. r=bent

This commit is contained in:
Chris Jones 2010-03-24 00:52:47 -05:00
parent ba0dff954e
commit f6e896ba0c
2 changed files with 13 additions and 3 deletions

View File

@ -96,7 +96,8 @@ RPCChannel::RPCChannel(RPCListener* aListener)
mOutOfTurnReplies(),
mDeferred(),
mRemoteStackDepthGuess(0),
mBlockedOnParent(false)
mBlockedOnParent(false),
mSawRPCOutMsg(false)
{
MOZ_COUNT_CTOR(RPCChannel);
@ -597,10 +598,11 @@ void
RPCChannel::ExitedCxxStack()
{
Listener()->OnExitedCxxStack();
{
if (mSawRPCOutMsg) {
MutexAutoLock lock(mMutex);
// see long comment in OnMaybeDequeueOne()
EnqueuePendingMessages();
mSawRPCOutMsg = false;
}
}

View File

@ -242,7 +242,10 @@ protected:
if (mThat.mCxxStackFrames.empty())
mThat.EnteredCxxStack();
mThat.mCxxStackFrames.push_back(RPCFrame(direction, msg));
mThat.mSawRPCOutMsg |= (direction == OUT_MESSAGE) &&
(msg->is_rpc());
}
~CxxStackFrame() {
@ -385,7 +388,12 @@ protected:
// not protected by mMutex. It is managed exclusively by the
// helper |class CxxStackFrame|.
std::vector<RPCFrame> mCxxStackFrames;
// Did we process an RPC out-call during this stack? Only
// meaningful in ExitedCxxStack(), from which this variable is
// reset.
bool mSawRPCOutMsg;
private:
//