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 "finalize_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 static_cast<D
*>(this)->traceAfterDispatch(visitor
);
26 void A::traceAfterDispatch(Visitor
* visitor
)
30 void A::finalizeGarbageCollectedObject()
37 static_cast<C
*>(this)->~C();
40 // Missing static_cast<D*>(this)->~D();
45 void B::traceAfterDispatch(Visitor
* visitor
)
48 A::traceAfterDispatch(visitor
);
51 void C::traceAfterDispatch(Visitor
* visitor
)
54 A::traceAfterDispatch(visitor
);
57 void D::traceAfterDispatch(Visitor
* visitor
)
60 Abstract::traceAfterDispatch(visitor
);