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

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

Issue 2312813002: Limit Mojo messages recursion depth (Closed)
Patch Set: Update comment to match arg name change 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }; 93 };
94 94
95 interface RecursionDepthTestInterface {
yzshen1 2016/09/06 17:03:10 I think it may make sense to add it to Conformance
tibell 2016/09/07 05:41:20 Moved it into ConformanceTestInterface. I agree w
96 Method0(Recursive recursive);
97 };
98
95 struct BasicStruct { 99 struct BasicStruct {
96 int32 a; 100 int32 a;
97 }; 101 };
98 102
99 interface IntegrationTestInterface { 103 interface IntegrationTestInterface {
100 Method0(BasicStruct param0) => (array<uint8> param0); 104 Method0(BasicStruct param0) => (array<uint8> param0);
101 }; 105 };
102 106
103 // An enum generates a enum-value validation function, so we want to test it. 107 // 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 108 // E.g., valid enum values for this enum should be: -3, 0, 1, 10
105 enum BasicEnum { 109 enum BasicEnum {
106 A, 110 A,
107 B, 111 B,
108 C = A, 112 C = A,
109 D = -3, 113 D = -3,
110 E = 0xA 114 E = 0xA
111 }; 115 };
112 116
113 // The enum validation function should be generated within the scope of this 117 // The enum validation function should be generated within the scope of this
114 // struct. 118 // struct.
115 struct StructWithEnum { 119 struct StructWithEnum {
116 enum EnumWithin { 120 enum EnumWithin {
117 A, B, C, D 121 A, B, C, D
118 }; 122 };
119 }; 123 };
124
125 // This is used to test that deeply recursive structures don't blow the stack.
126 struct Recursive {
127 Recursive? recursive;
128 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698