Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(543)

Unified Diff: Source/core/dom/Element.cpp

Issue 1167983002: Remove raw pointer member to AXObjectCache Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/modules/accessibility/AXObjectCacheImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Element.cpp
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
index 0c0bac11e5865c4574f89b638f7c5c9570ba7629..223528990cab0279fe37e8ddd71b808a7d67122c 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
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/modules/accessibility/AXObjectCacheImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698