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()); |