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