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