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

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

Issue 2536403002: blink_gc_plugin should require tracing for classes that have a trace method
Patch Set: Created 4 years, 1 month 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/base_with_trace_requires_tracing.h
diff --git a/tools/clang/blink_gc_plugin/tests/base_with_trace_requires_tracing.h b/tools/clang/blink_gc_plugin/tests/base_with_trace_requires_tracing.h
new file mode 100644
index 0000000000000000000000000000000000000000..b3f45785875ab1923e392bba7b484e48b82ab277
--- /dev/null
+++ b/tools/clang/blink_gc_plugin/tests/base_with_trace_requires_tracing.h
@@ -0,0 +1,35 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_WITH_TRACE_REQUIRES_TRACING_H_
+#define BASE_WITH_TRACE_REQUIRES_TRACING_H_
+
+#include "heap/stubs.h"
+
+namespace blink {
+
+class A : public GarbageCollected<A> {
+public:
+ virtual void trace(Visitor*);
+};
+
+class B : public A {
+ void trace(Visitor*);
+private:
+ // Ignoring all fields will mean this does not requiring tracing. But if a
+ // trace method is defined explicitly we should require tracing.
+ GC_PLUGIN_IGNORE("http://crbug.com/12345")
+ Member<A> m_a;
+};
+
+class C : public B {
+public:
+ void trace(Visitor*);
+private:
+ Member<A> m_a;
+};
+
+}
+
+#endif
« no previous file with comments | « tools/clang/blink_gc_plugin/RecordInfo.cpp ('k') | tools/clang/blink_gc_plugin/tests/base_with_trace_requires_tracing.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698