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 3fde494a82739aed60c1af01f40a55d0071b3c5c..f69be23a01fcd728228219576981f8e393541b3c 100644 |
--- a/third_party/WebKit/Source/core/dom/TreeScope.cpp |
+++ b/third_party/WebKit/Source/core/dom/TreeScope.cpp |
@@ -170,11 +170,11 @@ |
const HeapVector<Member<Element>>& TreeScope::getAllElementsById(const AtomicString& elementId) const |
{ |
- DEFINE_STATIC_LOCAL(HeapVector<Member<Element>>, emptyVector, (new HeapVector<Member<Element>>)); |
+ DEFINE_STATIC_LOCAL(Persistent<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); |
} |