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

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

Issue 1158623002: Extend destructor checks to account for eagerly finalized class types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated to look for IsEagerlyFinalizedMarker instead Created 5 years, 6 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 2015 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 DESTRUCTOR_EAGERLY_FINALIZED_H_
6 #define DESTRUCTOR_EAGERLY_FINALIZED_H_
7
8 #include "heap/stubs.h"
9
10 namespace blink {
11
12 class HeapObject : public GarbageCollected<HeapObject> {
13 public:
14 void trace(Visitor*) { }
15 void foo() { }
16 };
17
18 class HeapObjectEagerFinalized
19 : public GarbageCollectedFinalized<HeapObjectEagerFinalized> {
20 public:
21 EAGERLY_FINALIZED();
22 ~HeapObjectEagerFinalized();
23 void trace(Visitor*);
24
25 void foo() { }
26
27 private:
28 Member<HeapObject> m_obj;
29 };
30
31 // Accessing other eagerly finalized objects during finalization is not allowed.
32 class HeapObjectEagerFinalizedAlso
33 : public GarbageCollectedFinalized<HeapObjectEagerFinalizedAlso> {
34 public:
35 EAGERLY_FINALIZED();
36 ~HeapObjectEagerFinalizedAlso();
37 void trace(Visitor*);
38
39 private:
40 Member<HeapObject> m_heapObject;
41 Member<HeapObjectEagerFinalized> m_heapObjectFinalized;
42 HeapVector<Member<HeapObjectEagerFinalized>> m_heapVector;
43 };
44
45 } // namespace blink
46
47 #endif // DESTRUCTOR_EAGERLY_FINALIZED_H_
OLDNEW
« no previous file with comments | « tools/clang/blink_gc_plugin/RecordInfo.cpp ('k') | tools/clang/blink_gc_plugin/tests/destructor_eagerly_finalized.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698