зеркало из https://github.com/mozilla/gecko-dev.git
52 строки
1008 B
Plaintext
52 строки
1008 B
Plaintext
namespace mozilla {
|
|
namespace _ipdltest {
|
|
|
|
rpc protocol PTestBlockChild {
|
|
both:
|
|
rpc StackFrame();
|
|
|
|
child:
|
|
async Poke1();
|
|
async Poke2();
|
|
async LastPoke();
|
|
async __delete__();
|
|
|
|
parent:
|
|
async P1();
|
|
async P2();
|
|
async Done();
|
|
|
|
state START:
|
|
// here we |BlockChild()| in the C++
|
|
send Poke1 goto CHILD_BLOCKED;
|
|
|
|
state CHILD_BLOCKED:
|
|
call StackFrame goto CHILD_BLOCKED_RPC;
|
|
|
|
state CHILD_BLOCKED_RPC:
|
|
answer StackFrame goto CHILD_BLOCKED_RPC_POKE;
|
|
|
|
state CHILD_BLOCKED_RPC_POKE:
|
|
send Poke2 goto CHILD_STILL_BLOCKED;
|
|
|
|
// RPC stack frame gone. child should still be blocked
|
|
|
|
state CHILD_STILL_BLOCKED:
|
|
send LastPoke goto CHILD_FLUSH_QUEUE;
|
|
|
|
// here we |UnblockChild()| in the C++
|
|
|
|
state CHILD_FLUSH_QUEUE:
|
|
recv P1 goto CHILD_FLUSH_QUEUE_P2;
|
|
state CHILD_FLUSH_QUEUE_P2:
|
|
recv P2 goto CHILD_FLUSH_QUEUE_DONE;
|
|
state CHILD_FLUSH_QUEUE_DONE:
|
|
recv Done goto DONE;
|
|
|
|
state DONE:
|
|
send __delete__;
|
|
};
|
|
|
|
} // namespace _ipdltest
|
|
} // namespace mozilla
|