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

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

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, 7 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/AXObjectCache.cpp
diff --git a/Source/core/dom/AXObjectCache.cpp b/Source/core/dom/AXObjectCache.cpp
index b31a5b3b637ec20c202043e083c688a639536941..91a019e9a43dfeacd18f98785d4a51d99f7e71f3 100644
--- a/Source/core/dom/AXObjectCache.cpp
+++ b/Source/core/dom/AXObjectCache.cpp
@@ -40,7 +40,7 @@ void AXObjectCache::init(AXObjectCacheCreateFunction function)
m_createFunction = function;
}
-PassOwnPtr<AXObjectCache> AXObjectCache::create(Document& document)
+PassOwnPtrWillBeRawPtr<AXObjectCache> AXObjectCache::create(Document& document)
{
ASSERT(m_createFunction);
return (m_createFunction)(document);
@@ -70,6 +70,12 @@ ScopedAXObjectCache::ScopedAXObjectCache(Document& document)
}
}
+ScopedAXObjectCache::~ScopedAXObjectCache()
+{
+ if (m_ownedCache)
+ m_ownedCache->dispose();
+}
+
AXObjectCache* ScopedAXObjectCache::get()
{
ASSERT(m_cache);

Powered by Google App Engine
This is Rietveld 408576698