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