bool TestStackHooksChild::AnswerStackFrame() { if (!mOnStack) fail("missed stack notification"); if (1 != mIncallDepth) fail("missed EnteredCall or ExitedCall hook"); // FIXME use IPDL state instead if (4 == mEntered) { // test 4 if (!SendAsync()) fail("sending Async()"); } else if (5 == mEntered) { // test 5 if (!SendSync()) fail("sending Sync()"); } else { fail("unexpected |mEntered| count"); } if (!mOnStack) fail("bad stack exit notification"); return true; }
EXPORT_C TInt RSessionBase::DoSendReceive(TInt aFunction,const TIpcArgs* aArgs) const // // Send a message and wait for the reply synchronously. // { if (TUint(aFunction)<=TUint(KMaxTInt)) return SendSync(aFunction,aArgs); Panic(ETMesBadFunctionNumber); return 0; }
void TestStackHooksChild::RunTests() { // 1 because of RecvStart() if (1 != mEntered) fail("missed stack notification"); if (mOnStack) fail("spurious stack notification"); if (0 != mIncallDepth) fail("EnteredCall/ExitedCall malfunction"); if (!SendAsync()) fail("sending Async()"); if (mOnStack) fail("spurious stack notification"); if (0 != mIncallDepth) fail("EnteredCall/ExitedCall malfunction"); if (2 != mEntered) fail("missed stack notification"); if (!SendSync()) fail("sending Sync()"); if (mOnStack) fail("spurious stack notification"); if (0 != mIncallDepth) fail("EnteredCall/ExitedCall malfunction"); if (3 != mEntered) fail("missed stack notification"); if (!CallRpc()) fail("calling RPC()"); if (mOnStack) fail("spurious stack notification"); if (0 != mIncallDepth) fail("EnteredCall/ExitedCall malfunction"); if (4 != mEntered) fail("missed stack notification"); if (!CallStackFrame()) fail("calling StackFrame()"); if (mOnStack) fail("spurious stack notification"); if (0 != mIncallDepth) fail("EnteredCall/ExitedCall malfunction"); if (5 != mEntered) fail("missed stack notification"); Close(); }