Roll src/third_party/WebKit f36d5e0:68b67cd (svn 193299:193303)
[chromium-blink-merge.git] / tools / clang / blink_gc_plugin / tests / trace_templated_super.cpp
blob2b5903412b4a10e6d0f3b3e2a63eefc46e1a5b8e
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
3 // found in the LICENSE file.
5 #include "trace_templated_super.h"
7 namespace blink {
9 template<typename T>
10 void Super<T>::clearWeakMembers(Visitor* visitor)
12 (void)m_weak;
15 template<typename T>
16 void Super<T>::trace(Visitor* visitor)
18 visitor->registerWeakMembers<Super<T>, &Super<T>::clearWeakMembers>(this);
19 visitor->trace(m_obj);
20 Mixin::trace(visitor);
23 template<typename T>
24 void Sub<T>::trace(Visitor* visitor)
26 // Missing trace of m_obj.
27 Super<T>::trace(visitor);
30 void HeapObject::trace(Visitor* visitor)
32 visitor->trace(m_obj);
33 Sub<HeapObject>::trace(visitor);