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

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

Issue 235113002: Oilpan: Remove guardRef and guardDeref from TreeScope. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments. Created 6 years, 8 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/accessibility/AXObjectCache.h ('k') | Source/core/css/StyleSheetList.h » ('j') | no next file with comments »
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 0826a6079713ef15996d22d1ca145833d206816d..a363d753158aeebd2bb6b64fb20f7a35d1255df8 100644
--- a/Source/core/accessibility/AXObjectCache.cpp
+++ b/Source/core/accessibility/AXObjectCache.cpp
@@ -571,6 +571,18 @@ void AXObjectCache::remove(AbstractInlineTextBox* inlineTextBox)
m_inlineTextBoxObjectMapping.remove(inlineTextBox);
}
+// FIXME: Oilpan: Use a weak hashmap for this instead.
+void AXObjectCache::clearWeakMembers(Visitor* visitor)
+{
+ Vector<Node*> deadNodes;
+ for (HashMap<Node*, AXID>::iterator it = m_nodeObjectMapping.begin(); it != m_nodeObjectMapping.end(); ++it) {
+ if (!visitor->isAlive(it->key))
+ deadNodes.append(it->key);
+ }
+ for (unsigned i = 0; i < deadNodes.size(); ++i)
+ remove(deadNodes[i]);
+}
+
AXID AXObjectCache::platformGenerateAXID() const
{
static AXID lastUsedID = 0;
« no previous file with comments | « Source/core/accessibility/AXObjectCache.h ('k') | Source/core/css/StyleSheetList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698