コード例 #1
0
ファイル: TestStackHooks.cpp プロジェクト: amyvmiwei/firefox
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;
}
コード例 #2
0
ファイル: us_mes.cpp プロジェクト: kuailexs/symbiandump-os1
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;
	}
コード例 #3
0
ファイル: TestStackHooks.cpp プロジェクト: amyvmiwei/firefox
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();
}