Bug 1118618 - IPDL notifications when sending sync messages (r=bent)

This commit is contained in:
Bill McCloskey 2015-01-16 10:10:19 -08:00
parent c66c93c95b
commit 0928a9dbff
3 changed files with 27 additions and 1 deletions

View File

@ -177,6 +177,11 @@ public:
return INTR_SEMS == mMesageSemantics && OUT_MESSAGE == mDirection;
}
bool IsOutgoingSync() const {
return (mMesageSemantics == INTR_SEMS || mMesageSemantics == SYNC_SEMS) &&
mDirection == OUT_MESSAGE;
}
void Describe(int32_t* id, const char** dir, const char** sems,
const char** name) const
{
@ -218,6 +223,9 @@ public:
if (frame.IsInterruptIncall())
mThat.EnteredCall();
if (frame.IsOutgoingSync())
mThat.EnteredSyncSend();
mThat.mSawInterruptOutMsg |= frame.IsInterruptOutcall();
}
@ -226,7 +234,9 @@ public:
MOZ_ASSERT(!mThat.mCxxStackFrames.empty());
bool exitingCall = mThat.mCxxStackFrames.back().IsInterruptIncall();
const InterruptFrame& frame = mThat.mCxxStackFrames.back();
bool exitingSync = frame.IsOutgoingSync();
bool exitingCall = frame.IsInterruptIncall();
mThat.mCxxStackFrames.shrinkBy(1);
bool exitingStack = mThat.mCxxStackFrames.empty();
@ -239,6 +249,9 @@ public:
if (exitingCall)
mThat.ExitedCall();
if (exitingSync)
mThat.ExitedSyncSend();
if (exitingStack)
mThat.ExitedCxxStack();
}

View File

@ -291,6 +291,14 @@ class MessageChannel : HasResultCodes
mListener->OnExitedCall();
}
void EnteredSyncSend() {
mListener->OnEnteredSyncSend();
}
void ExitedSyncSend() {
mListener->OnExitedSyncSend();
}
MessageListener *Listener() const {
return mListener.get();
}

View File

@ -98,6 +98,11 @@ class MessageListener
return RIPChildWins;
}
virtual void OnEnteredSyncSend() {
}
virtual void OnExitedSyncSend() {
}
virtual void ProcessRemoteNativeEventsInInterruptCall() {
}