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

Unified Diff: third_party/WebKit/Source/core/style/StyleTransformData.cpp

Issue 2917353002: [DO NOT LAND] Example snippet for crbug.com/729447.
Patch Set: Created 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/style/StyleTransformData.cpp
diff --git a/third_party/WebKit/Source/core/style/StyleTransformData.cpp b/third_party/WebKit/Source/core/style/StyleTransformData.cpp
index 0d13e536a56634109b002b01f071b78d0aae5a7d..68ce62477fb71d058151392f34f0cf15452198f1 100644
--- a/third_party/WebKit/Source/core/style/StyleTransformData.cpp
+++ b/third_party/WebKit/Source/core/style/StyleTransformData.cpp
@@ -61,4 +61,29 @@ bool StyleTransformData::Has3DTransform() const {
(scale_ && scale_->Z() != 1);
}
+// Simple GC'd class
+struct Cat : public GarbageCollected<Cat> { // (A)
+ DECLARE_TRACE();
+};
+
+// Simple class that uses a GC'd class.
+template <class T>
+struct Ptr {
+ T* ptr;
+};
+
+// Simple overloaded template functions
+template <class T>
+void meow(const T*) {}
+
+template <class T>
+void meow(const Ptr<T>&) {}
+
+// Calls meow with explicit template parameters.
+// Expect to call meow(const T*).
+// error: [blink-gc] Class 'Ptr<blink::Cat>' contains invalid fields.
+void boom() {
+ meow<Cat>(new Cat); // (B)
+}
+
} // namespace blink
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698