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

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

Issue 2033643003: Adjust representation of liveDocumentSet() to help diagnose instability. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « third_party/WebKit/Source/core/dom/Document.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 9fc4c7814ef020c524e21105cc1b27838c53cd0c..587c08a0dbf5b3bc767b255262741682be3266e7 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -366,9 +366,11 @@ uint64_t Document::s_globalTreeVersion = 0;
static bool s_threadedParsingEnabledForTesting = true;
-Document::WeakDocumentSet& Document::liveDocumentSet()
+using WeakDocumentSet = PersistentHeapHashSet<WeakMember<Document>>;
+
+static WeakDocumentSet& liveDocumentSet()
{
- DEFINE_STATIC_LOCAL(WeakDocumentSet, set, (new WeakDocumentSet));
+ DEFINE_STATIC_LOCAL(WeakDocumentSet, set, ());
return set;
}
@@ -6035,7 +6037,7 @@ template class CORE_TEMPLATE_EXPORT Supplement<Document>;
using namespace blink;
void showLiveDocumentInstances()
{
- Document::WeakDocumentSet& set = Document::liveDocumentSet();
+ WeakDocumentSet& set = liveDocumentSet();
fprintf(stderr, "There are %u documents currently alive:\n", set.size());
for (Document* document : set)
fprintf(stderr, "- Document %p URL: %s\n", document, document->url().getString().utf8().data());
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698