Roll src/third_party/WebKit d10c917:a1123a1 (svn 198729:198730)
[chromium-blink-merge.git] / tools / clang / blink_gc_plugin / tests / weak_fields_require_tracing.cpp
blob382e9f9739283d27ab03e0f609e62b2b85ce2d62
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"
7 namespace blink {
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.