OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CLASS_DOES_NOT_REQUIRE_FINALIZATION_BASE_H_ | 5 #ifndef CLASS_DOES_NOT_REQUIRE_FINALIZATION_BASE_H_ |
6 #define CLASS_DOES_NOT_REQUIRE_FINALIZATION_BASE_H_ | 6 #define CLASS_DOES_NOT_REQUIRE_FINALIZATION_BASE_H_ |
7 | 7 |
8 #include "heap/stubs.h" | 8 #include "heap/stubs.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
(...skipping 15 matching lines...) Expand all Loading... |
26 public: | 26 public: |
27 ~DoesNotNeedFinalizer2(); | 27 ~DoesNotNeedFinalizer2(); |
28 void trace(Visitor*); | 28 void trace(Visitor*); |
29 }; | 29 }; |
30 | 30 |
31 class HasEmptyDtor { | 31 class HasEmptyDtor { |
32 public: | 32 public: |
33 virtual ~HasEmptyDtor() { } | 33 virtual ~HasEmptyDtor() { } |
34 }; | 34 }; |
35 | 35 |
36 class DoesNotNeedFinalizer3 | 36 // If there are any virtual destructors involved, give up. |
37 : public GarbageCollectedFinalized<DoesNotNeedFinalizer3>, | 37 |
| 38 class DoesNeedFinalizer2 |
| 39 : public GarbageCollectedFinalized<DoesNeedFinalizer2>, |
38 public HasEmptyDtor { | 40 public HasEmptyDtor { |
39 public: | 41 public: |
40 void trace(Visitor*); | 42 void trace(Visitor*); |
41 }; | 43 }; |
42 | 44 |
43 } | 45 } |
44 | 46 |
45 #endif | 47 #endif |
OLD | NEW |