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

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

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 #include "destructor_eagerly_finalized.h"
6
7 namespace blink {
8
9 HeapObjectEagerFinalized::~HeapObjectEagerFinalized()
10 {
11 // Valid access to a non-eagerly finalized field
12 m_obj->foo();
13 }
14
15 void HeapObjectEagerFinalized::trace(Visitor* visitor)
16 {
17 visitor->trace(m_obj);
18 }
19
20 HeapObjectEagerFinalizedAlso::~HeapObjectEagerFinalizedAlso()
21 {
22 // Valid access to a non-eagerly finalized field
23 m_heapObject->foo();
24
25 // Non-valid accesses to eagerly finalized fields.
26 m_heapObjectFinalized->foo();
27 m_heapVector[0]->foo();
28 }
29
30 void HeapObjectEagerFinalizedAlso::trace(Visitor* visitor)
31 {
32 visitor->trace(m_heapObject);
33 visitor->trace(m_heapObjectFinalized);
34 visitor->trace(m_heapVector);
35 }
36
37 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698