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

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

Issue 1855203002: Revert of Improve DEFINE_STATIC_LOCAL()'s handling of Blink GCed objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: third_party/WebKit/Source/core/dom/Node.cpp
diff --git a/third_party/WebKit/Source/core/dom/Node.cpp b/third_party/WebKit/Source/core/dom/Node.cpp
index f2544b3facf3ee697a4cad02e1f28252efe13465..da9b660fe040cfcefff918acd9093e59c4e0e16d 100644
--- a/third_party/WebKit/Source/core/dom/Node.cpp
+++ b/third_party/WebKit/Source/core/dom/Node.cpp
@@ -128,8 +128,8 @@
using WeakNodeSet = HeapHashSet<WeakMember<Node>>;
static WeakNodeSet& liveNodeSet()
{
- DEFINE_STATIC_LOCAL(WeakNodeSet, set, (new WeakNodeSet));
- return set;
+ DEFINE_STATIC_LOCAL(Persistent<WeakNodeSet>, set, (new WeakNodeSet()));
+ return *set;
}
#endif
@@ -1886,8 +1886,8 @@
using EventTargetDataMap = HeapHashMap<WeakMember<Node>, Member<EventTargetData>>;
static EventTargetDataMap& eventTargetDataMap()
{
- DEFINE_STATIC_LOCAL(EventTargetDataMap, map, (new EventTargetDataMap));
- return map;
+ DEFINE_STATIC_LOCAL(Persistent<EventTargetDataMap>, map, (new EventTargetDataMap()));
+ return *map;
}
EventTargetData* Node::eventTargetData()

Powered by Google App Engine
This is Rietveld 408576698