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

Unified Diff: Source/modules/accessibility/InspectorAccessibilityAgent.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/modules/accessibility/InspectorAccessibilityAgent.cpp
diff --git a/Source/modules/accessibility/InspectorAccessibilityAgent.cpp b/Source/modules/accessibility/InspectorAccessibilityAgent.cpp
index 68b5a477dc35880fc69d6c55d048af8ce316f406..f43c4ce29e01b7d40e49437714ffe52cf3f18c03 100644
--- a/Source/modules/accessibility/InspectorAccessibilityAgent.cpp
+++ b/Source/modules/accessibility/InspectorAccessibilityAgent.cpp
@@ -356,11 +356,12 @@ void InspectorAccessibilityAgent::getAXNode(ErrorString* errorString, int nodeId
return;
Document& document = node->document();
- OwnPtr<ScopedAXObjectCache> cache = ScopedAXObjectCache::create(document);
+ OwnPtrWillBeRawPtr<ScopedAXObjectCache> cache = ScopedAXObjectCache::create(document);
AXObjectCacheImpl* cacheImpl = toAXObjectCacheImpl(cache->get());
AXObject* axObject = cacheImpl->getOrCreate(node);
if (!axObject || axObject->accessibilityIsIgnored()) {
accessibilityNode = buildObjectForIgnoredNode(node, axObject, cacheImpl);
+ cache->dispose();
return;
}
@@ -372,6 +373,7 @@ void InspectorAccessibilityAgent::getAXNode(ErrorString* errorString, int nodeId
fillRelationships(axObject, properties);
accessibilityNode = buildObjectForNode(node, axObject, cacheImpl, properties);
+ cache->dispose();
}
DEFINE_TRACE(InspectorAccessibilityAgent)
« Source/core/dom/AXObjectCache.h ('K') | « Source/modules/accessibility/AXObjectCacheImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698