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

Unified Diff: Source/modules/accessibility/InspectorAccessibilityAgent.cpp

Issue 1072273006: Oilpan: Prepare moving AXObject to 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
Index: Source/modules/accessibility/InspectorAccessibilityAgent.cpp
diff --git a/Source/modules/accessibility/InspectorAccessibilityAgent.cpp b/Source/modules/accessibility/InspectorAccessibilityAgent.cpp
index fe1664975ef649c729a11bc6d63cb6b452e2ebc6..33e430d9d2bef0d601d29d24e1a1f5b29a01583d 100644
--- a/Source/modules/accessibility/InspectorAccessibilityAgent.cpp
+++ b/Source/modules/accessibility/InspectorAccessibilityAgent.cpp
@@ -425,8 +425,16 @@ void InspectorAccessibilityAgent::getAXNode(ErrorString* errorString, int nodeId
if (!node)
return;
Document& document = node->document();
- RefPtr<ScopedAXObjectCache> cache(adoptRef(new ScopedAXObjectCache(document)));
- AXObjectCacheImpl* cacheImpl = toAXObjectCacheImpl(cache->get());
+#if ENABLE(OILPAN)
+ if (!document.axObjectCache())
+ return;
+ ScopedAXObjectCache cache(document);
+ AXObjectCacheImpl* cacheImpl = toAXObjectCacheImpl(cache.get());
+#else
+ AXObjectCacheImpl* cacheImpl = toAXObjectCacheImpl(document.axObjectCache());
+ if (!cacheImpl)
+ return;
+#endif
AXObject* axObject = cacheImpl->getOrCreate(node);
if (!axObject)
return;

Powered by Google App Engine
This is Rietveld 408576698