summaryrefslogtreecommitdiffstats
path: root/ipc/ipdl/test/gtest/PTestCancel.ipdl
blob: b0af04bae7dd14478f2b9c27172887c309ff0dfd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

namespace mozilla {
namespace _ipdltest {

[NestedUpTo=inside_sync, ChildProc=any, ChildImpl=virtual, ParentImpl=virtual]
sync protocol PTestCancel
{
    // Immediate Cancel: child sync function cancels immediately, both ends check after cancellation.
child:
    [Nested=inside_sync] sync ImmediateCancel();


    // Nested Cancel: child nested sync function cancels
child:
    async StartNestedCancel();
    [Nested=inside_sync] sync NestedCancel();
parent:
    [Nested=inside_sync] sync CallNestedCancel();


    // Nested Cancel Parent: parent nested sync function cancels
child:
    [Nested=inside_sync] sync StartNestedCancelParent();
parent:
    [Nested=inside_sync] sync NestedCancelParent();


// Common functions to check that sync messages still work.
child:
    [Nested=inside_sync] sync CheckChild() returns (uint32_t reply);
parent:
    [Nested=inside_sync] sync CheckParent() returns (uint32_t reply);
};

} // namespace _ipdltest
} // namespace mozilla