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

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

Issue 1081673003: Oilpan: Prepare to move AXObjectCache to the heap (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index a03e9fdd052455f771809d9533c3753b33d36df7..8578ba3f6dcc803dbb80ba4c8e85d4babb34286c 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -2207,9 +2207,11 @@ Document& Document::axObjectCacheOwner() const
void Document::clearAXObjectCache()
haraken 2015/04/28 10:45:21 It is unsafe to land this CL at the moment since D
{
ASSERT(&axObjectCacheOwner() == this);
- // Clear the cache member variable before calling delete because attempts
- // are made to access it during destruction.
- m_axObjectCache.clear();
+ // Clear the cache member variable before calling discard because attempts
haraken 2015/04/28 10:45:21 What is discard?
keishi 2015/05/28 06:49:15 My mistake. I got confused. Reverted.
+ // are made to access it during discard.
+ OwnPtrWillBeRawPtr<AXObjectCache> cache = m_axObjectCache.release();
+ if (cache)
+ cache->dispose();
haraken 2015/04/28 10:45:21 Nit: if (m_axObjectCache) m_axObjectCache->disp
keishi 2015/05/28 06:49:15 Done.
}
AXObjectCache* Document::existingAXObjectCache() const
@@ -5705,6 +5707,7 @@ DEFINE_TRACE(Document)
visitor->trace(m_activeHoverElement);
visitor->trace(m_documentElement);
visitor->trace(m_titleElement);
+ visitor->trace(m_axObjectCache);
visitor->trace(m_markers);
visitor->trace(m_cssTarget);
visitor->trace(m_currentScriptStack);

Powered by Google App Engine
This is Rietveld 408576698