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

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: Rebased upto r183571 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 4548ffe941640490be9c810d3b57e4ff09aa297f..e3731980b1ae58271e5e87065f787c5c2ad437d5 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(toFrameView(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