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

Unified Diff: tools/clang/blink_gc_plugin/tests/heap/stubs.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: robustify namespace equality checking instead 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/heap/stubs.h
diff --git a/tools/clang/blink_gc_plugin/tests/heap/stubs.h b/tools/clang/blink_gc_plugin/tests/heap/stubs.h
index 8f7feccc9c49c61dec056168f4bae3933a03a4ce..fff4a781659e159ca1e7c2a7975a8e7ab30e312f 100644
--- a/tools/clang/blink_gc_plugin/tests/heap/stubs.h
+++ b/tools/clang/blink_gc_plugin/tests/heap/stubs.h
@@ -118,6 +118,23 @@ class HashMap {};
}
+// Empty namespace declaration to exercise internal
+// handling of namespace equality.
+namespace std {
+ /* empty */
+}
+
+namespace std {
+
+template<typename T> class unique_ptr {
+public:
+ ~unique_ptr() { }
+ operator T*() const { return 0; }
+ T* operator->() { return 0; }
+};
+
+}
+
namespace blink {
using namespace WTF;
@@ -178,6 +195,27 @@ public:
bool operator!() const { return false; }
};
+template<typename T> class WeakPersistent {
+public:
+ operator T*() const { return 0; }
+ T* operator->() { return 0; }
+ bool operator!() const { return false; }
+};
+
+template<typename T> class CrossThreadPersistent {
+public:
+ operator T*() const { return 0; }
+ T* operator->() { return 0; }
+ bool operator!() const { return false; }
+};
+
+template<typename T> class CrossThreadWeakPersistent {
+public:
+ operator T*() const { return 0; }
+ T* operator->() { return 0; }
+ bool operator!() const { return false; }
+};
+
class HeapAllocator {
public:
static const bool isGarbageCollected = true;

Powered by Google App Engine
This is Rietveld 408576698