It is legitimate to have such a recursive mojo definition:
struct Foo {
Foo nested_foo;
};
If a malicious sender constructs a message with an very deeply-nested Foo object, our validation code may cause the call stack to overflow.
One solution is to have a depth counter in ValidationContext and issue validation error when the counter exceeds a certain number.
Comment 1 by yzshen@chromium.org
, Aug 23 2016