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

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

Issue 1385193002: Bisect clang Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 246985 Created 5 years, 2 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
(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 blink {
11
12 class NeedsFinalize : public GarbageCollectedFinalized<NeedsFinalize> {
13 public:
14 void trace(Visitor*);
15 void traceAfterDispatch(Visitor*);
16 // Needs a finalizeGarbageCollectedObject method.
17 };
18
19 class NeedsDispatch : public GarbageCollectedFinalized<NeedsDispatch> {
20 public:
21 void trace(Visitor*);
22 // Needs a traceAfterDispatch method.
23 void finalizeGarbageCollectedObject() { };
24 };
25
26 class NeedsFinalizedBase : public GarbageCollected<NeedsFinalizedBase> {
27 public:
28 void trace(Visitor*) { };
29 void traceAfterDispatch(Visitor*) { };
30 void finalizeGarbageCollectedObject() { };
31 };
32
33 class A : GarbageCollectedFinalized<A> {
34 public:
35 void trace(Visitor*);
36 void traceAfterDispatch(Visitor*);
37 void finalizeGarbageCollectedObject();
38 protected:
39 enum Type { TB, TC, TD };
40 A(Type type) : m_type(type) { }
41 private:
42 Type m_type;
43 };
44
45 class B : public A {
46 public:
47 B() : A(TB) { }
48 ~B() { }
49 void traceAfterDispatch(Visitor*);
50 private:
51 Member<A> m_a;
52 };
53
54 class C : public A {
55 public:
56 C() : A(TC) { }
57 void traceAfterDispatch(Visitor*);
58 private:
59 Member<A> m_a;
60 };
61
62 // This class is considered abstract does not need to be dispatched to.
63 class Abstract : public A {
64 protected:
65 Abstract(Type type) : A(type) { }
66 };
67
68 class D : public Abstract {
69 public:
70 D() : Abstract(TD) { }
71 void traceAfterDispatch(Visitor*);
72 private:
73 Member<A> m_a;
74 };
75
76 }
77
78 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698