mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-18 00:19:56 +00:00
Remove bogus assert in RPC calls (bug 937216, r=cjones).
This commit is contained in:
parent
4c3052ea3a
commit
bc3a485edc
@ -472,9 +472,6 @@ MessageChannel::RPCCall(Message* aMsg, Message* aReply)
|
||||
|
||||
MonitorAutoLock lock(*mMonitor);
|
||||
|
||||
// RPC calls must be the only thing on the stack.
|
||||
IPC_ASSERT(!AwaitingInterruptReply(), "rpc calls cannot be issued within interrupts");
|
||||
|
||||
AutoEnterRPCTransaction transact(this);
|
||||
aMsg->set_transaction_id(mCurrentRPCTransaction);
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
namespace mozilla {
|
||||
namespace _ipdltest {
|
||||
|
||||
rpc protocol PTestRPC
|
||||
intr protocol PTestRPC
|
||||
{
|
||||
parent:
|
||||
rpc Test1_Start() returns (uint32_t result);
|
||||
@ -10,6 +10,8 @@ parent:
|
||||
rpc Test2_OutOfOrder();
|
||||
sync Test3_Start() returns (uint32_t result);
|
||||
rpc Test3_InnerEvent() returns (uint32_t result);
|
||||
intr Test4_Start() returns (uint32_t result);
|
||||
rpc Test4_Inner() returns (uint32_t result);
|
||||
|
||||
child:
|
||||
async Start();
|
||||
@ -18,6 +20,7 @@ child:
|
||||
urgent Test2_FirstUrgent();
|
||||
urgent Test2_SecondUrgent();
|
||||
urgent Test3_WakeUp() returns (uint32_t result);
|
||||
urgent Test4_WakeUp() returns (uint32_t result);
|
||||
};
|
||||
|
||||
} // namespace _ipdltest
|
||||
|
@ -98,6 +98,22 @@ TestRPCParent::AnswerTest3_InnerEvent(uint32_t* aResult)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
TestRPCParent::AnswerTest4_Start(uint32_t* aResult)
|
||||
{
|
||||
if (!CallTest4_WakeUp(aResult))
|
||||
fail("CallTest4_WakeUp");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
TestRPCParent::AnswerTest4_Inner(uint32_t* aResult)
|
||||
{
|
||||
*aResult = 700;
|
||||
return true;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// child
|
||||
|
||||
@ -133,6 +149,12 @@ TestRPCChild::RecvStart()
|
||||
if (result != 200)
|
||||
fail("Wrong result (expected 200)");
|
||||
|
||||
// See bug 937216 (RPC calls within interrupts).
|
||||
if (!CallTest4_Start(&result))
|
||||
fail("SendTest4_Start");
|
||||
if (result != 700)
|
||||
fail("Wrong result (expected 700)");
|
||||
|
||||
Close();
|
||||
return true;
|
||||
}
|
||||
@ -178,5 +200,14 @@ TestRPCChild::AnswerTest3_WakeUp(uint32_t* aResult)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
TestRPCChild::AnswerTest4_WakeUp(uint32_t* aResult)
|
||||
{
|
||||
if (!CallTest4_Inner(aResult))
|
||||
fail("CallTest4_Inner");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace _ipdltest
|
||||
} // namespace mozilla
|
||||
|
@ -28,6 +28,8 @@ public:
|
||||
bool AnswerTest2_OutOfOrder() MOZ_OVERRIDE;
|
||||
bool RecvTest3_Start(uint32_t* aResult) MOZ_OVERRIDE;
|
||||
bool AnswerTest3_InnerEvent(uint32_t* aResult) MOZ_OVERRIDE;
|
||||
bool AnswerTest4_Start(uint32_t* aResult) MOZ_OVERRIDE;
|
||||
bool AnswerTest4_Inner(uint32_t* aResult) MOZ_OVERRIDE;
|
||||
|
||||
virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
|
||||
{
|
||||
@ -60,6 +62,7 @@ public:
|
||||
bool AnswerTest2_FirstUrgent() MOZ_OVERRIDE;
|
||||
bool AnswerTest2_SecondUrgent() MOZ_OVERRIDE;
|
||||
bool AnswerTest3_WakeUp(uint32_t* aResult) MOZ_OVERRIDE;
|
||||
bool AnswerTest4_WakeUp(uint32_t* aResult) MOZ_OVERRIDE;
|
||||
|
||||
virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user