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

Side by Side Diff: tools/clang/blink_gc_plugin/tests/finalize_after_dispatch.h

Issue 197863003: Check consistency of manual trace and finalization dispatching. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
(Empty)
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.
4
5 #ifndef FINALIZE_AFTER_DISPATCH_H_
6 #define FINALIZE_AFTER_DISPATCH_H_
7
8 #include "heap/stubs.h"
9
10 namespace WebCore {
11
12 class NeedsFinalize : public GarbageCollectedFinalized<NeedsFinalize> {
13 public:
14 void trace(Visitor*);
15 void traceAfterDispatch(Visitor*);
16 // Needs a finalize dispatch method.
17 };
18
19 class A : GarbageCollectedFinalized<A> {
20 public:
21 void trace(Visitor*);
22 void traceAfterDispatch(Visitor*);
23 void finalize();
24 protected:
25 enum Type { TB, TC, TD };
26 A(Type type) : m_type(type) { }
27 private:
28 Type m_type;
29 };
30
31 class B : public A {
32 public:
33 B() : A(TB) { }
34 ~B() { }
35 void traceAfterDispatch(Visitor*);
36 private:
37 Member<A> m_a;
38 };
39
40 class C : public A {
41 public:
42 C() : A(TC) { }
43 void traceAfterDispatch(Visitor*);
44 private:
45 Member<A> m_a;
46 };
47
48 // This class is considered abstract does not need to be dispatched to.
49 class Abstract : public A {
50 protected:
51 Abstract(Type type) : A(type) { }
52 };
53
54 class D : public Abstract {
55 public:
56 D() : Abstract(TD) { }
57 void traceAfterDispatch(Visitor*);
58 private:
59 Member<A> m_a;
60 };
61
62 }
63
64 #endif
OLDNEW
« no previous file with comments | « tools/clang/blink_gc_plugin/RecordInfo.cpp ('k') | tools/clang/blink_gc_plugin/tests/finalize_after_dispatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698