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

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

Issue 51273002: Have ChildFrameDisconnector / ChildListMutationScope deal with references (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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 | « Source/core/dom/ChildListMutationScope.h ('k') | Source/core/dom/ContainerNode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ChildListMutationScope.cpp
diff --git a/Source/core/dom/ChildListMutationScope.cpp b/Source/core/dom/ChildListMutationScope.cpp
index 6acb5b1ba68d2bc664f551baf703a74d461aeec3..47e296e37f76837c2286393381ede3e9520f8eb1 100644
--- a/Source/core/dom/ChildListMutationScope.cpp
+++ b/Source/core/dom/ChildListMutationScope.cpp
@@ -62,14 +62,14 @@ ChildListMutationAccumulator::~ChildListMutationAccumulator()
accumulatorMap().remove(m_target.get());
}
-PassRefPtr<ChildListMutationAccumulator> ChildListMutationAccumulator::getOrCreate(Node* target)
+PassRefPtr<ChildListMutationAccumulator> ChildListMutationAccumulator::getOrCreate(Node& target)
{
- AccumulatorMap::AddResult result = accumulatorMap().add(target, 0);
+ AccumulatorMap::AddResult result = accumulatorMap().add(&target, 0);
RefPtr<ChildListMutationAccumulator> accumulator;
if (!result.isNewEntry)
accumulator = result.iterator->value;
else {
- accumulator = adoptRef(new ChildListMutationAccumulator(target, MutationObserverInterestGroup::createForChildListMutation(target)));
+ accumulator = adoptRef(new ChildListMutationAccumulator(PassRefPtr<Node>(target), MutationObserverInterestGroup::createForChildListMutation(target)));
result.iterator->value = accumulator.get();
}
return accumulator.release();
« no previous file with comments | « Source/core/dom/ChildListMutationScope.h ('k') | Source/core/dom/ContainerNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698