Index: Source/core/dom/Element.cpp |
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp |
index c25a6fe5afcad58959fe66b591d5766b5d0005e2..a198ef8383949ade41213d9a09692be025f5a3f2 100644 |
--- a/Source/core/dom/Element.cpp |
+++ b/Source/core/dom/Element.cpp |
@@ -1031,15 +1031,15 @@ IntRect Element::screenRect() const |
const AtomicString& Element::computedRole() |
{ |
document().updateLayoutIgnorePendingStylesheets(); |
- RefPtr<ScopedAXObjectCache> cache(adoptRef(new ScopedAXObjectCache(document()))); |
- return (*cache)->computedRoleForNode(this); |
+ ScopedAXObjectCache cache(document()); |
+ return cache->computedRoleForNode(this); |
} |
String Element::computedName() |
{ |
document().updateLayoutIgnorePendingStylesheets(); |
- RefPtr<ScopedAXObjectCache> cache(adoptRef(new ScopedAXObjectCache(document()))); |
- return (*cache)->computedNameForNode(this); |
+ ScopedAXObjectCache cache(document()); |
+ return cache->computedNameForNode(this); |
} |
const AtomicString& Element::getAttribute(const AtomicString& localName) const |