Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(794)

Side by Side Diff: mojo/public/interfaces/bindings/tests/validation_test_interfaces.mojom

Issue 2312813002: Limit Mojo messages recursion depth (Closed)
Patch Set: Address more review comments Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 5
6 [JavaPackage="org.chromium.mojo.bindings.test.mojom.mojo"] 6 [JavaPackage="org.chromium.mojo.bindings.test.mojom.mojo"]
7 module mojo.test; 7 module mojo.test;
8 8
9 struct StructA { 9 struct StructA {
10 uint64 i; 10 uint64 i;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 Method9(array<array<handle?>>? param0); 83 Method9(array<array<handle?>>? param0);
84 Method10(map<string, uint8> param0); 84 Method10(map<string, uint8> param0);
85 Method11(StructG param0); 85 Method11(StructG param0);
86 Method12(float param0) => (float param0); 86 Method12(float param0) => (float param0);
87 Method13(InterfaceA? param0, uint32 param1, InterfaceA? param2); 87 Method13(InterfaceA? param0, uint32 param1, InterfaceA? param2);
88 Method14(EnumA param0, EnumB param1); 88 Method14(EnumA param0, EnumB param1);
89 Method15(array<EnumA>? param0, array<EnumB>? param1); 89 Method15(array<EnumA>? param0, array<EnumB>? param1);
90 Method16(map<EnumA, EnumA>? param0); 90 Method16(map<EnumA, EnumA>? param0);
91 Method17(array<InterfaceA> param0); 91 Method17(array<InterfaceA> param0);
92 Method18(UnionA? param0); 92 Method18(UnionA? param0);
93 Method19(Recursive recursive);
93 }; 94 };
94 95
95 struct BasicStruct { 96 struct BasicStruct {
96 int32 a; 97 int32 a;
97 }; 98 };
98 99
99 interface IntegrationTestInterface { 100 interface IntegrationTestInterface {
100 Method0(BasicStruct param0) => (array<uint8> param0); 101 Method0(BasicStruct param0) => (array<uint8> param0);
101 }; 102 };
102 103
103 // An enum generates a enum-value validation function, so we want to test it. 104 // An enum generates a enum-value validation function, so we want to test it.
104 // E.g., valid enum values for this enum should be: -3, 0, 1, 10 105 // E.g., valid enum values for this enum should be: -3, 0, 1, 10
105 enum BasicEnum { 106 enum BasicEnum {
106 A, 107 A,
107 B, 108 B,
108 C = A, 109 C = A,
109 D = -3, 110 D = -3,
110 E = 0xA 111 E = 0xA
111 }; 112 };
112 113
113 // The enum validation function should be generated within the scope of this 114 // The enum validation function should be generated within the scope of this
114 // struct. 115 // struct.
115 struct StructWithEnum { 116 struct StructWithEnum {
116 enum EnumWithin { 117 enum EnumWithin {
117 A, B, C, D 118 A, B, C, D
118 }; 119 };
119 }; 120 };
121
122 // This is used to test that deeply recursive structures don't blow the stack.
123 struct Recursive {
124 Recursive? recursive;
125 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698