Index: Source/core/accessibility/AXObjectCache.cpp |
diff --git a/Source/core/accessibility/AXObjectCache.cpp b/Source/core/accessibility/AXObjectCache.cpp |
index 72c4d73c460468a51bb14236cbd8a0ae24c57391..bfa1509ffe5a8f536365c0c3b9c3d0f0b4fe174d 100644 |
--- a/Source/core/accessibility/AXObjectCache.cpp |
+++ b/Source/core/accessibility/AXObjectCache.cpp |
@@ -579,6 +579,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 |