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

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

Issue 374593002: Support ignorance of base class finalizers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reworked, static check now expressed by RecordInfo::NeedsFinalization() Created 6 years, 5 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_requires_finalization_base.h
diff --git a/tools/clang/blink_gc_plugin/tests/class_requires_finalization_base.h b/tools/clang/blink_gc_plugin/tests/class_requires_finalization_base.h
index 9504dcac2fe3fe5fc0e73ade5d21636e11c075dd..995df6c40f43ff37a5e591c5749e8516cee6e1b3 100644
--- a/tools/clang/blink_gc_plugin/tests/class_requires_finalization_base.h
+++ b/tools/clang/blink_gc_plugin/tests/class_requires_finalization_base.h
@@ -19,6 +19,15 @@ public:
~B() { /* user-declared, thus, non-trivial */ }
};
+// WebCore::ScriptWrappable receives special treatment
+// so as to allow it to be used together with GarbageCollected<T>,
+// even when its user-declared destructor is provided.
+// As it is with Oilpan disabled.
+class ScriptWrappable {
zerny-chromium 2014/07/08 07:45:03 Define ScriptWrappable in heap/stubs.h That shoul
sof 2014/07/08 08:47:05 Done.
+public:
+ ~ScriptWrappable() { /* user-declared, thus, non-trivial */ }
+};
+
// Second base class needs finalization.
class NeedsFinalizer : public A, public B {
public:
@@ -31,6 +40,20 @@ public:
void trace(Visitor*);
};
+class GCedClassWithAScriptWrappableBase
+ : public A, public ScriptWrappable {
+public:
+ void trace(Visitor*);
+};
+
+class GCedClassWithAScriptWrappableAndAFinalizableBase
+ : public GCedClassWithAScriptWrappableBase
+ , public B
+ , public ScriptWrappable {
+public:
+ void trace(Visitor*);
+};
+
}
#endif

Powered by Google App Engine
This is Rietveld 408576698