Chromium Code Reviews| Index: Source/core/dom/AXObjectCache.h |
| diff --git a/Source/core/dom/AXObjectCache.h b/Source/core/dom/AXObjectCache.h |
| index 0ffd1fc273f5ca4bd408b319f49b8d2f9bfd5e44..c42bb2b4c9ee27267f6430ecdb1d39db24cfd434 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: |
| @@ -141,18 +145,27 @@ private: |
| static AXObjectCacheCreateFunction m_createFunction; |
| }; |
| -class CORE_EXPORT ScopedAXObjectCache { |
| +class CORE_EXPORT ScopedAXObjectCache : public NoBaseWillBeGarbageCollectedFinalized<ScopedAXObjectCache> { |
|
haraken
2015/05/28 08:57:57
Is ScopedAXObjectCache used in performance-sensiti
keishi
2015/05/29 09:00:57
Done.
|
| WTF_MAKE_NONCOPYABLE(ScopedAXObjectCache); |
| public: |
| - static PassOwnPtr<ScopedAXObjectCache> create(Document&); |
| + static PassOwnPtrWillBeRawPtr<ScopedAXObjectCache> create(Document&); |
| + ~ScopedAXObjectCache(); |
| + DECLARE_TRACE(); |
| + |
| + void dispose(); |
| AXObjectCache* get(); |
| private: |
| explicit ScopedAXObjectCache(Document&); |
| - OwnPtr<AXObjectCache> m_ownedCache; |
| - AXObjectCache* m_cache; |
| + OwnPtrWillBeMember<AXObjectCache> m_ownedCache; |
| + RawPtrWillBeMember<AXObjectCache> m_cache; |
|
haraken
2015/05/28 08:57:57
If we keep ScopedAXObjectCache off-heap, we need t
|
| + |
| +#if ENABLE(ASSERT) |
| + // Verified when finalizing. |
| + bool m_hasBeenDisposed; |
| +#endif |
| }; |
| } |