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

Unified Diff: Source/core/dom/NodeListsNodeData.h

Issue 461413002: WIP: ~HashTableAddResult crashes in oilpan builds Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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
« no previous file with comments | « no previous file | Source/wtf/HashMap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « no previous file | Source/wtf/HashMap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698