| 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;
|
|
|