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
3 // found in the LICENSE file.
5 #include "trace_after_dispatch.h"
9 static B
* toB(A
* a
) { return static_cast<B
*>(a
); }
11 void A::trace(Visitor
* visitor
)
15 toB(this)->traceAfterDispatch(visitor
);
18 static_cast<C
*>(this)->traceAfterDispatch(visitor
);
21 // Missing static_cast<D*>(this)->traceAfterDispatch(visitor);
26 void A::traceAfterDispatch(Visitor
* visitor
)
30 void B::traceAfterDispatch(Visitor
* visitor
)
33 // Missing A::traceAfterDispatch(visitor);
34 // Also check that calling trace does not count.
38 void C::traceAfterDispatch(Visitor
* visitor
)
40 // Missing visitor->trace(m_a);
41 A::traceAfterDispatch(visitor
);
44 void D::traceAfterDispatch(Visitor
* visitor
)
47 Abstract::traceAfterDispatch(visitor
);