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

Unified Diff: Source/core/dom/ContextFeatures.h

Issue 255983003: Oilpan: Move all supplements of Page, Document, and WorkerClients to the managed heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review comments Created 6 years, 8 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: Source/core/dom/ContextFeatures.h
diff --git a/Source/core/dom/ContextFeatures.h b/Source/core/dom/ContextFeatures.h
index 7a72256ac49788cf5637e2fce97572dc841c7727..2d22444a8a87a9b45ec8761af5331715d38e37c3 100644
--- a/Source/core/dom/ContextFeatures.h
+++ b/Source/core/dom/ContextFeatures.h
@@ -35,8 +35,16 @@ class ContextFeaturesClient;
class Document;
class Page;
+#if ENABLE(OILPAN)
+class ContextFeatures FINAL : public RefCountedGarbageCollected<ContextFeatures>, public HeapSupplement<Page> {
+ WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(ContextFeatures);
+public:
+ typedef HeapSupplement<Page> SupplementType;
+#else
class ContextFeatures : public RefCountedSupplement<Page, ContextFeatures> {
public:
+ typedef RefCountedSupplement<Page, ContextFeatures> SupplementType;
+#endif
enum FeatureType {
DialogElement = 0,
StyleScoped,
@@ -48,7 +56,7 @@ public:
static const char* supplementName();
static ContextFeatures* defaultSwitch();
- static PassRefPtr<ContextFeatures> create(PassOwnPtr<ContextFeaturesClient>);
+ static PassRefPtrWillBeRawPtr<ContextFeatures> create(PassOwnPtr<ContextFeaturesClient>);
static bool dialogElementEnabled(Document*);
static bool styleScopedEnabled(Document*);
@@ -59,6 +67,10 @@ public:
bool isEnabled(Document*, FeatureType, bool) const;
void urlDidChange(Document*);
+#if ENABLE(OILPAN)
haraken 2014/04/30 11:18:08 Sometimes you're adding ENABLE(OILPAN) to trace(Vi
zerny-chromium 2014/04/30 11:46:53 It is needed in this particular case because in th
+ virtual void trace(Visitor*) OVERRIDE { }
+#endif
+
private:
explicit ContextFeatures(PassOwnPtr<ContextFeaturesClient> client)
: m_client(client)
@@ -80,9 +92,9 @@ public:
void provideContextFeaturesTo(Page&, PassOwnPtr<ContextFeaturesClient>);
void provideContextFeaturesToDocumentFrom(Document&, Page&);
-inline PassRefPtr<ContextFeatures> ContextFeatures::create(PassOwnPtr<ContextFeaturesClient> client)
+inline PassRefPtrWillBeRawPtr<ContextFeatures> ContextFeatures::create(PassOwnPtr<ContextFeaturesClient> client)
{
- return adoptRef(new ContextFeatures(client));
+ return adoptRefWillBeRefCountedGarbageCollected(new ContextFeatures(client));
}
inline bool ContextFeatures::isEnabled(Document* document, FeatureType type, bool defaultValue) const

Powered by Google App Engine
This is Rietveld 408576698