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 "weak_fields_require_tracing.h"
9 void HeapObject::trace(Visitor
* visitor
)
11 // Missing visitor->trace(m_obj1);
12 // Missing visitor->trace(m_obj2);
13 // visitor->trace(m_obj3) in callback.
14 // Missing visitor->trace(m_set1);
15 visitor
->trace(m_set2
);
16 visitor
->registerWeakMembers
<HeapObject
,
17 &HeapObject::clearWeakMembers
>(this);
20 void HeapObject::clearWeakMembers(Visitor
* visitor
)
22 visitor
->trace(m_obj1
); // Does not count.
23 // Missing visitor->trace(m_obj2);
24 visitor
->trace(m_obj3
); // OK.
25 visitor
->trace(m_set1
); // Does not count.