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

Unified Diff: Source/core/dom/ChildListMutationScope.cpp

Issue 236653002: Oilpan: move mutation observers to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased + explicitly dispose() mutation observer registrations always (non-Oilpan also.) Created 6 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: Source/core/dom/ChildListMutationScope.cpp
diff --git a/Source/core/dom/ChildListMutationScope.cpp b/Source/core/dom/ChildListMutationScope.cpp
index 699b554100f797d230970aa31fa004c0d2d604fe..cce9f6bebc756a792feb3b3348ea43677fcd32d8 100644
--- a/Source/core/dom/ChildListMutationScope.cpp
+++ b/Source/core/dom/ChildListMutationScope.cpp
@@ -40,13 +40,14 @@
namespace WebCore {
typedef HashMap<Node*, ChildListMutationAccumulator*> AccumulatorMap;
+
static AccumulatorMap& accumulatorMap()
{
DEFINE_STATIC_LOCAL(AccumulatorMap, map, ());
return map;
}
-ChildListMutationAccumulator::ChildListMutationAccumulator(PassRefPtr<Node> target, PassOwnPtr<MutationObserverInterestGroup> observers)
+ChildListMutationAccumulator::ChildListMutationAccumulator(PassRefPtr<Node> target, PassOwnPtrWillBeRawPtr<MutationObserverInterestGroup> observers)
: m_target(target)
, m_lastAdded(0)
, m_observers(observers)
@@ -127,7 +128,7 @@ void ChildListMutationAccumulator::enqueueMutationRecord()
RefPtr<NodeList> addedNodes = StaticNodeList::adopt(m_addedNodes);
RefPtr<NodeList> removedNodes = StaticNodeList::adopt(m_removedNodes);
- RefPtr<MutationRecord> record = MutationRecord::createChildList(m_target, addedNodes.release(), removedNodes.release(), m_previousSibling.release(), m_nextSibling.release());
+ RefPtrWillBeRawPtr<MutationRecord> record = MutationRecord::createChildList(m_target, addedNodes.release(), removedNodes.release(), m_previousSibling.release(), m_nextSibling.release());
m_observers->enqueueMutationRecord(record.release());
m_lastAdded = 0;
ASSERT(isEmpty());

Powered by Google App Engine
This is Rietveld 408576698