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

Unified Diff: Source/core/accessibility/AXObjectCache.cpp

Issue 603193005: Move the Widget hierarchy to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase needed again Created 6 years, 2 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 | « no previous file | Source/core/accessibility/AXScrollView.h » ('j') | Source/core/frame/FrameView.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/accessibility/AXObjectCache.cpp
diff --git a/Source/core/accessibility/AXObjectCache.cpp b/Source/core/accessibility/AXObjectCache.cpp
index 72c4d73c460468a51bb14236cbd8a0ae24c57391..7bd97ce6592245a6a451a314dd4c656048320923 100644
--- a/Source/core/accessibility/AXObjectCache.cpp
+++ b/Source/core/accessibility/AXObjectCache.cpp
@@ -340,6 +340,7 @@ AXObject* AXObjectCache::getOrCreate(Widget* widget)
return obj;
RefPtr<AXObject> newObj = nullptr;
+ // FIXME: test for isScrollView() instead?
if (widget->isFrameView())
newObj = AXScrollView::create(toScrollView(widget));
else if (widget->isScrollbar())
@@ -579,6 +580,14 @@ void AXObjectCache::clearWeakMembers(Visitor* visitor)
}
for (unsigned i = 0; i < deadNodes.size(); ++i)
remove(deadNodes[i]);
+
+ Vector<Widget*> deadWidgets;
+ for (HashMap<Widget*, AXID>::iterator it = m_widgetObjectMapping.begin(); it != m_widgetObjectMapping.end(); ++it) {
+ if (!visitor->isAlive(it->key))
+ deadWidgets.append(it->key);
+ }
+ for (unsigned i = 0; i < deadWidgets.size(); ++i)
+ remove(deadWidgets[i]);
}
AXID AXObjectCache::platformGenerateAXID() const
« no previous file with comments | « no previous file | Source/core/accessibility/AXScrollView.h » ('j') | Source/core/frame/FrameView.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698