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

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: using namespace WebCore 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
« no previous file with comments | « Source/core/dom/CSSSelectorWatch.cpp ('k') | Source/core/dom/ContextFeatures.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
+ 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
« no previous file with comments | « Source/core/dom/CSSSelectorWatch.cpp ('k') | Source/core/dom/ContextFeatures.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698