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

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

Issue 1081673003: Oilpan: Prepare to move AXObjectCache to the heap (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 | « no previous file | Source/core/dom/AXObjectCache.cpp » ('j') | Source/core/dom/Document.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/AXObjectCache.h
diff --git a/Source/core/dom/AXObjectCache.h b/Source/core/dom/AXObjectCache.h
index e73da6b63fe417d2e13e25986925628f0763252c..6cfa2ecfe840ad15f49cbb58d2406cc6e24b0964 100644
--- a/Source/core/dom/AXObjectCache.h
+++ b/Source/core/dom/AXObjectCache.h
@@ -40,14 +40,16 @@ class LayoutMenuList;
class Page;
class Widget;
-class CORE_EXPORT AXObjectCache {
- WTF_MAKE_NONCOPYABLE(AXObjectCache); WTF_MAKE_FAST_ALLOCATED(AXObjectCache);
+class CORE_EXPORT AXObjectCache : public NoBaseWillBeGarbageCollectedFinalized<AXObjectCache> {
+ WTF_MAKE_NONCOPYABLE(AXObjectCache);
+ WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(AXObjectCache);
public:
- static PassOwnPtr<AXObjectCache> create(Document&);
+ static PassOwnPtrWillBeRawPtr<AXObjectCache> create(Document&);
static AXObject* focusedUIElementForPage(const Page*);
virtual ~AXObjectCache();
+ DEFINE_INLINE_VIRTUAL_TRACE() { }
enum AXNotification {
AXActiveDescendantChanged,
@@ -81,6 +83,8 @@ public:
AXValueChanged
};
+ virtual void dispose() = 0;
+
virtual void selectionChanged(Node*) = 0;
virtual void childrenChanged(Node*) = 0;
virtual void childrenChanged(LayoutObject*) = 0;
@@ -131,7 +135,7 @@ public:
virtual const AtomicString& computedRoleForNode(Node*) = 0;
virtual String computedNameForNode(Node*) = 0;
- typedef PassOwnPtr<AXObjectCache> (*AXObjectCacheCreateFunction)(Document&);
+ typedef PassOwnPtrWillBeRawPtr<AXObjectCache> (*AXObjectCacheCreateFunction)(Document&);
static void init(AXObjectCacheCreateFunction);
protected:
@@ -145,13 +149,18 @@ class CORE_EXPORT ScopedAXObjectCache {
WTF_MAKE_NONCOPYABLE(ScopedAXObjectCache);
public:
explicit ScopedAXObjectCache(Document&);
+ ~ScopedAXObjectCache();
AXObjectCache* get();
AXObjectCache* operator->();
private:
+#if ENABLE(OILPAN)
+ bool m_isOwned;
+#else
OwnPtr<AXObjectCache> m_ownedCache;
haraken 2015/04/28 10:45:20 Why can't we just use OwnPtrWillBePersistent (and
keishi 2015/05/28 06:49:15 Done.
- AXObjectCache* m_cache;
+#endif
+ RawPtrWillBePersistent<AXObjectCache> m_cache;
};
}
« no previous file with comments | « no previous file | Source/core/dom/AXObjectCache.cpp » ('j') | Source/core/dom/Document.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698