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

Unified Diff: Source/core/testing/Internals.cpp

Issue 24106007: Replace style sharing cousin list search with LRU (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updating with esprehn's changes Created 7 years, 3 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 | « Source/core/dom/Element.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/testing/Internals.cpp
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
index 173c7f419de50af69ed449d0ffaf47209cec983a..ad961fa8d953f8c7873be042652f90b0bd0faed0 100644
--- a/Source/core/testing/Internals.cpp
+++ b/Source/core/testing/Internals.cpp
@@ -1544,11 +1544,17 @@ void Internals::toggleOverwriteModeEnabled(Document* document, ExceptionState&)
unsigned Internals::numberOfLiveNodes() const
{
+ if (StyleResolver* resolver = contextDocument()->styleResolverIfExists())
+ resolver->clearStyleSharingList();
+
return InspectorCounters::counterValue(InspectorCounters::NodeCounter);
}
unsigned Internals::numberOfLiveDocuments() const
{
+ if (StyleResolver* resolver = contextDocument()->styleResolverIfExists())
+ resolver->clearStyleSharingList();
+
return InspectorCounters::counterValue(InspectorCounters::DocumentCounter);
}
@@ -1841,6 +1847,11 @@ void Internals::garbageCollectDocumentResources(Document* document, ExceptionSta
return;
}
+ if (StyleResolver* resolver = contextDocument()->styleResolverIfExists())
+ resolver->clearStyleSharingList();
+ if (StyleResolver* resolver = document->styleResolverIfExists())
+ resolver->clearStyleSharingList();
+
ResourceFetcher* fetcher = document->fetcher();
if (!fetcher)
return;
« no previous file with comments | « Source/core/dom/Element.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698