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

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

Issue 18097008: Remove unused startIgnoringLeaks and stopIgnoringLeaks functions (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch should be ready for review Created 7 years, 5 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/Node.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Node.cpp
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
index f319353b50b3a5fbeca901b395b8fc4e3d23d783..c970b388b6136f35682a593200c75701752e03be 100644
--- a/Source/core/dom/Node.cpp
+++ b/Source/core/dom/Node.cpp
@@ -259,25 +259,6 @@ void Node::dumpStatistics()
}
DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, nodeCounter, ("WebCoreNode"));
-DEFINE_DEBUG_ONLY_GLOBAL(HashSet<Node*>, ignoreSet, );
-
-#ifndef NDEBUG
-static bool shouldIgnoreLeaks = false;
-#endif
-
-void Node::startIgnoringLeaks()
-{
-#ifndef NDEBUG
- shouldIgnoreLeaks = true;
-#endif
-}
-
-void Node::stopIgnoringLeaks()
-{
-#ifndef NDEBUG
- shouldIgnoreLeaks = false;
-#endif
-}
Node::StyleChange Node::diff(const RenderStyle* s1, const RenderStyle* s2, Document* doc)
{
@@ -344,10 +325,7 @@ Node::StyleChange Node::diff(const RenderStyle* s1, const RenderStyle* s2, Docum
void Node::trackForDebugging()
{
#ifndef NDEBUG
- if (shouldIgnoreLeaks)
- ignoreSet.add(this);
- else
- nodeCounter.increment();
+ nodeCounter.increment();
#endif
#if DUMP_NODE_STATISTICS
@@ -358,11 +336,7 @@ void Node::trackForDebugging()
Node::~Node()
{
#ifndef NDEBUG
- HashSet<Node*>::iterator it = ignoreSet.find(this);
- if (it != ignoreSet.end())
- ignoreSet.remove(it);
- else
- nodeCounter.decrement();
+ nodeCounter.decrement();
#endif
#if DUMP_NODE_STATISTICS
« no previous file with comments | « Source/core/dom/Node.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698