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

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

Issue 1207613004: Fix leaking AXNodeObjects when sub document detaches (Closed) 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 67d2aade857ba3a23849345346db45b872b6a5fb..aedb82cfd8d8e76b27f94995805b7fa7464715f8 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -2185,8 +2185,13 @@ void Document::detach(const AttachContext& context)
frameHost()->chromeClient().focusedNodeChanged(oldFocusedElement.get(), nullptr);
}
- if (this == &axObjectCacheOwner())
+ if (this == &axObjectCacheOwner()) {
clearAXObjectCache();
+ } else if (AXObjectCache* cache = existingAXObjectCache()) {
haraken 2015/06/24 11:52:13 Maybe worth having a comment about the relationshi
+ for (Node& node : NodeTraversal::descendantsOf(*this)) {
+ cache->remove(&node);
+ }
+ }
m_layoutView = nullptr;
ContainerNode::detach(context);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698