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

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

Issue 1116773003: Remove unnecessary clearing of AX object cache in Document destructor. (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
« 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 bf714974445a61bb8cc6dabc55046a7577359e0f..15a3649042fc5db6e11ece32d006c0e3cc6c2fa6 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -529,6 +529,9 @@ Document::~Document()
{
ASSERT(!layoutView());
ASSERT(!parentTreeScope());
+ // If a top document with a cache, verify that it was comprehensively
+ // cleared during detach.
+ ASSERT(!m_axObjectCache);
#if !ENABLE(OILPAN)
ASSERT(m_ranges.isEmpty());
ASSERT(!hasGuardRefCount());
@@ -557,12 +560,7 @@ Document::~Document()
// if the DocumentParser outlives the Document it won't cause badness.
ASSERT(!m_parser || m_parser->refCount() == 1);
detachParser();
-#endif
- if (this == &axObjectCacheOwner())
- clearAXObjectCache();
-
-#if !ENABLE(OILPAN)
if (m_styleSheetList)
m_styleSheetList->detachFromDocument();
« 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