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

Unified Diff: third_party/WebKit/Source/core/dom/TreeScope.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/TreeScope.cpp
diff --git a/third_party/WebKit/Source/core/dom/TreeScope.cpp b/third_party/WebKit/Source/core/dom/TreeScope.cpp
index f69be23a01fcd728228219576981f8e393541b3c..3fde494a82739aed60c1af01f40a55d0071b3c5c 100644
--- a/third_party/WebKit/Source/core/dom/TreeScope.cpp
+++ b/third_party/WebKit/Source/core/dom/TreeScope.cpp
@@ -170,11 +170,11 @@ Element* TreeScope::getElementById(const AtomicString& elementId) const
const HeapVector<Member<Element>>& TreeScope::getAllElementsById(const AtomicString& elementId) const
{
- DEFINE_STATIC_LOCAL(Persistent<HeapVector<Member<Element>>>, emptyVector, (new HeapVector<Member<Element>>()));
+ DEFINE_STATIC_LOCAL(HeapVector<Member<Element>>, emptyVector, (new HeapVector<Member<Element>>));
if (elementId.isEmpty())
- return *emptyVector;
+ return emptyVector;
if (!m_elementsById)
- return *emptyVector;
+ return emptyVector;
return m_elementsById->getAllElementsById(elementId, this);
}

Powered by Google App Engine
This is Rietveld 408576698