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

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

Issue 2060553002: GC plugin: improve error reporting when tracing illegal fields. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/fields_illegal_tracing.h
diff --git a/tools/clang/blink_gc_plugin/tests/fields_illegal_tracing.h b/tools/clang/blink_gc_plugin/tests/fields_illegal_tracing.h
new file mode 100644
index 0000000000000000000000000000000000000000..6182898f67f65427c05e2bfafa0e10fde1d8763b
--- /dev/null
+++ b/tools/clang/blink_gc_plugin/tests/fields_illegal_tracing.h
@@ -0,0 +1,37 @@
+// Copyright 2016 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 FIELDS_ILLEGAL_TRACING_H_
+#define FIELDS_ILLEGAL_TRACING_H_
+
+#include "heap/stubs.h"
+
+namespace blink {
+
+class HeapObject;
+class PartObject;
+
+class PartObject {
+ DISALLOW_ALLOCATION();
+public:
+ void trace(Visitor*);
+private:
+ OwnPtr<HeapObject> m_obj1;
+ std::unique_ptr<HeapObject> m_obj2;
+ RefPtr<HeapObject> m_obj3;
+};
+
+class HeapObject : public GarbageCollectedFinalized<HeapObject> {
+public:
+ void trace(Visitor*);
+private:
+ PartObject m_part;
+ OwnPtr<HeapObject> m_obj1;
+ RefPtr<HeapObject> m_obj2;
+ std::unique_ptr<HeapObject> m_obj3;
+};
+
+}
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698