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

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

Issue 2578103003: Add use-chromium-style-naming option to Blink GC plugin. (Closed)
Patch Set: Rebase Created 4 years 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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 #include "destructor_eagerly_finalized.h" 5 #include "destructor_eagerly_finalized.h"
6 6
7 namespace blink { 7 namespace blink {
8 8
9 HeapObjectEagerFinalized::~HeapObjectEagerFinalized() 9 HeapObjectEagerFinalized::~HeapObjectEagerFinalized()
10 { 10 {
11 // Valid access to a non-eagerly finalized field 11 // Valid access to a non-eagerly finalized field
12 m_obj->foo(); 12 m_obj->foo();
13 } 13 }
14 14
15 void HeapObjectEagerFinalized::trace(Visitor* visitor) 15 void HeapObjectEagerFinalized::Trace(Visitor* visitor)
16 { 16 {
17 visitor->trace(m_obj); 17 visitor->Trace(m_obj);
18 } 18 }
19 19
20 HeapObjectEagerFinalizedAlso::~HeapObjectEagerFinalizedAlso() 20 HeapObjectEagerFinalizedAlso::~HeapObjectEagerFinalizedAlso()
21 { 21 {
22 // Valid access to a non-eagerly finalized field 22 // Valid access to a non-eagerly finalized field
23 m_heapObject->foo(); 23 m_heapObject->foo();
24 24
25 // Non-valid accesses to eagerly finalized fields. 25 // Non-valid accesses to eagerly finalized fields.
26 m_heapObjectFinalized->foo(); 26 m_heapObjectFinalized->foo();
27 m_heapVector[0]->foo(); 27 m_heapVector[0]->foo();
28 } 28 }
29 29
30 void HeapObjectEagerFinalizedAlso::trace(Visitor* visitor) 30 void HeapObjectEagerFinalizedAlso::Trace(Visitor* visitor)
31 { 31 {
32 visitor->trace(m_heapObject); 32 visitor->Trace(m_heapObject);
33 visitor->trace(m_heapObjectFinalized); 33 visitor->Trace(m_heapObjectFinalized);
34 visitor->trace(m_heapVector); 34 visitor->Trace(m_heapVector);
35 } 35 }
36 36
37 } // namespace blink 37 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698