Index: Source/core/dom/NodeListsNodeData.h |
diff --git a/Source/core/dom/NodeListsNodeData.h b/Source/core/dom/NodeListsNodeData.h |
index 66156ff8daa0d925037efad9808aedd413745fc9..174f19cbe0cd6b9f8be8150a28f8cba83324e7cd 100644 |
--- a/Source/core/dom/NodeListsNodeData.h |
+++ b/Source/core/dom/NodeListsNodeData.h |
@@ -98,17 +98,27 @@ public: |
template<typename T> |
PassRefPtrWillBeRawPtr<T> addCache(ContainerNode& node, CollectionType collectionType, const AtomicString& name) |
{ |
- NodeListAtomicNameCacheMap::AddResult result = m_atomicNameCaches.add(namedNodeListKey(collectionType, name), nullptr); |
- if (!result.isNewEntry) { |
+ RefPtrWillBeRawPtr<T> list; |
+ { |
+ NodeListAtomicNameCacheMap::AddResult result = m_atomicNameCaches.add(namedNodeListKey(collectionType, name), nullptr); |
+ if (!result.isNewEntry) { |
#if ENABLE(OILPAN) |
- return static_cast<T*>(result.storedValue->value.get()); |
+ return static_cast<T*>(result.storedValue->value.get()); |
#else |
- return static_cast<T*>(result.storedValue->value); |
+ return static_cast<T*>(result.storedValue->value); |
#endif |
+ } |
+ |
+ fprintf(stderr, "a %ld %ld %p %p\n", result.m_containerModifications, result.m_container->modifications(), result.m_container, &m_atomicNameCaches.m_impl); |
+ Heap::collectAllGarbage(); |
+ fprintf(stderr, "b %ld %ld %p %p\n", result.m_containerModifications, result.m_container->modifications(), result.m_container, &m_atomicNameCaches.m_impl); |
+ fprintf(stderr, "c\n"); |
+ list = T::create(node, collectionType, name); |
+ fprintf(stderr, "d\n"); |
+ result.storedValue->value = list.get(); |
+ fprintf(stderr, "e\n"); |
} |
- |
- RefPtrWillBeRawPtr<T> list = T::create(node, collectionType, name); |
- result.storedValue->value = list.get(); |
+ fprintf(stderr, "f\n"); |
haraken
2014/08/13 07:54:32
This code prints the following crash log. The cras
|
return list.release(); |
} |