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

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

Issue 1072273006: Oilpan: Prepare moving AXObject to heap (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
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 9b0511ddc6e663203c3e32580568af971fab7083..e7d7f5eb112a1e435c21a02c82d9ae9e685e7b26 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -2127,8 +2127,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()) {
+ for (Element& element : ElementTraversal::descendantsOf(*this)) {
+ cache->remove(&element);
dmazzoni 2015/06/08 15:25:49 What would happen if we called AXObjectCache::getO
+ }
+ }
m_layoutView = nullptr;
ContainerNode::detach(context);

Powered by Google App Engine
This is Rietveld 408576698