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

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

Issue 278523004: Blink GC plugin: require that trace call base::trace and traceAfterDispatch call base::traceAfterDi… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
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 #include "trace_after_dispatch.h" 5 #include "trace_after_dispatch.h"
6 6
7 namespace WebCore { 7 namespace WebCore {
8 8
9 static B* toB(A* a) { return static_cast<B*>(a); } 9 static B* toB(A* a) { return static_cast<B*>(a); }
10 10
(...skipping 12 matching lines...) Expand all
23 } 23 }
24 } 24 }
25 25
26 void A::traceAfterDispatch(Visitor* visitor) 26 void A::traceAfterDispatch(Visitor* visitor)
27 { 27 {
28 } 28 }
29 29
30 void B::traceAfterDispatch(Visitor* visitor) 30 void B::traceAfterDispatch(Visitor* visitor)
31 { 31 {
32 visitor->trace(m_a); 32 visitor->trace(m_a);
33 // Missing A::trace(visitor); 33 // Missing A::traceAfterDispatch(visitor);
34 // Also check that calling trace does not count.
35 A::trace(visitor);
34 } 36 }
35 37
36 void C::traceAfterDispatch(Visitor* visitor) 38 void C::traceAfterDispatch(Visitor* visitor)
37 { 39 {
38 // Missing visitor->trace(m_a); 40 // Missing visitor->trace(m_a);
39 A::trace(visitor); 41 A::traceAfterDispatch(visitor);
40 } 42 }
41 43
42 void D::traceAfterDispatch(Visitor* visitor) 44 void D::traceAfterDispatch(Visitor* visitor)
43 { 45 {
44 visitor->trace(m_a); 46 visitor->trace(m_a);
45 Abstract::trace(visitor); 47 Abstract::traceAfterDispatch(visitor);
46 } 48 }
47 49
48 } 50 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698