Chromium Code Reviews| Index: Source/modules/accessibility/InspectorAccessibilityAgent.cpp |
| diff --git a/Source/modules/accessibility/InspectorAccessibilityAgent.cpp b/Source/modules/accessibility/InspectorAccessibilityAgent.cpp |
| index fe1664975ef649c729a11bc6d63cb6b452e2ebc6..502278ade247a9e048f96fb639f9aa4ed5097f74 100644 |
| --- a/Source/modules/accessibility/InspectorAccessibilityAgent.cpp |
| +++ b/Source/modules/accessibility/InspectorAccessibilityAgent.cpp |
| @@ -425,8 +425,10 @@ 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 (!document.axObjectCache()) |
|
haraken
2015/04/28 11:36:25
Why do we need an early return here? According to
keishi
2015/05/28 06:49:13
My mistake. Removed.
|
| + return; |
| + ScopedAXObjectCache cache(document); |
| + AXObjectCacheImpl* cacheImpl = toAXObjectCacheImpl(cache.get()); |
| AXObject* axObject = cacheImpl->getOrCreate(node); |
| if (!axObject) |
| return; |