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

Unified Diff: third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp

Issue 1850413002: Improve DEFINE_STATIC_LOCAL()'s handling of Blink GCed objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address compilation failure 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/shadow/ShadowRoot.cpp
diff --git a/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp b/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp
index 11b24f03f5c53bb9a366de12cd434bde157e3d1e..23da88b7e2b4204554ad63de20504d8a1bede3b6 100644
--- a/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp
+++ b/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp
@@ -297,7 +297,7 @@ void ShadowRoot::invalidateDescendantInsertionPoints()
const HeapVector<Member<InsertionPoint>>& ShadowRoot::descendantInsertionPoints()
{
- DEFINE_STATIC_LOCAL(PersistentHeapVector<Member<InsertionPoint>>, emptyList, ());
+ DEFINE_STATIC_LOCAL(HeapVector<Member<InsertionPoint>>, emptyList, (new HeapVector<Member<InsertionPoint>>));
if (m_shadowRootRareData && m_descendantInsertionPointsIsValid)
return m_shadowRootRareData->descendantInsertionPoints();
@@ -349,7 +349,7 @@ unsigned ShadowRoot::descendantSlotCount() const
const HeapVector<Member<HTMLSlotElement>>& ShadowRoot::descendantSlots()
{
- DEFINE_STATIC_LOCAL(PersistentHeapVector<Member<HTMLSlotElement>>, emptyList, ());
+ DEFINE_STATIC_LOCAL(HeapVector<Member<HTMLSlotElement>>, emptyList, (new HeapVector<Member<HTMLSlotElement>>));
if (m_descendantSlotsIsValid) {
ASSERT(m_shadowRootRareData);
return m_shadowRootRareData->descendantSlots();

Powered by Google App Engine
This is Rietveld 408576698