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

Unified Diff: tools/clang/blink_gc_plugin/tests/class_multiple_trace_bases.h

Issue 273873002: Blink GC plugin: require a trace method if a class derives multiple bases that need tracing. (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 side-by-side diff with in-line comments
Download patch
Index: tools/clang/blink_gc_plugin/tests/class_multiple_trace_bases.h
diff --git a/tools/clang/blink_gc_plugin/tests/garbage_collected_mixin.h b/tools/clang/blink_gc_plugin/tests/class_multiple_trace_bases.h
similarity index 60%
copy from tools/clang/blink_gc_plugin/tests/garbage_collected_mixin.h
copy to tools/clang/blink_gc_plugin/tests/class_multiple_trace_bases.h
index 127199de44ff70e4586e9b1acf1425e583a9b290..afbf39ea02c5e67f34f65330cc1e309e5eb0287a 100644
--- a/tools/clang/blink_gc_plugin/tests/garbage_collected_mixin.h
+++ b/tools/clang/blink_gc_plugin/tests/class_multiple_trace_bases.h
@@ -2,26 +2,26 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef GARBAGE_COLLECTED_MIXIN_H_
-#define GARBAGE_COLLECTED_MIXIN_H_
+#ifndef CLASS_MULTIPLE_TRACE_BASES_H_
+#define CLASS_MULTIPLE_TRACE_BASES_H_
#include "heap/stubs.h"
namespace WebCore {
+class Base : public GarbageCollected<Base> {
+public:
+ virtual void trace(Visitor*);
+};
+
class Mixin : public GarbageCollectedMixin {
public:
void trace(Visitor*);
-private:
- Member<Mixin> m_self;
};
-class HeapObject : public GarbageCollected<HeapObject>, public Mixin {
+class Derived : public Base, public Mixin {
USING_GARBAGE_COLLECTED_MIXIN(HeapObject);
-public:
- void trace(Visitor*);
-private:
- Member<Mixin> m_mix;
+ // Requires trace method.
};
}
« no previous file with comments | « tools/clang/blink_gc_plugin/RecordInfo.cpp ('k') | tools/clang/blink_gc_plugin/tests/class_multiple_trace_bases.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698