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. 4 5 #include "trace_templated_super.h" 6 7 namespace blink { 8 9 template<typename T> clearWeakMembers(Visitor * visitor)10void Super<T>::clearWeakMembers(Visitor* visitor) 11 { 12 (void)m_weak; 13 } 14 15 template<typename T> Trace(Visitor * visitor)16void Super<T>::Trace(Visitor* visitor) 17 { 18 visitor->RegisterWeakMembers<Super<T>, &Super<T>::clearWeakMembers>(this); 19 visitor->Trace(m_obj); 20 Mixin::Trace(visitor); 21 } 22 23 template<typename T> Trace(Visitor * visitor)24void Sub<T>::Trace(Visitor* visitor) 25 { 26 // Missing Trace of m_obj. 27 Super<T>::Trace(visitor); 28 } 29 Trace(Visitor * visitor)30void HeapObject::Trace(Visitor* visitor) 31 { 32 visitor->Trace(m_obj); 33 Sub<HeapObject>::Trace(visitor); 34 } 35 36 } 37