Index: third_party/WebKit/Source/core/dom/MutationObserverInterestGroup.cpp |
diff --git a/third_party/WebKit/Source/core/dom/MutationObserverInterestGroup.cpp b/third_party/WebKit/Source/core/dom/MutationObserverInterestGroup.cpp |
index 689d0f4466328615c24dabccf1b453df224db152..26e0a7e0bca99000af3a4c38442ccc6911b5e29a 100644 |
--- a/third_party/WebKit/Source/core/dom/MutationObserverInterestGroup.cpp |
+++ b/third_party/WebKit/Source/core/dom/MutationObserverInterestGroup.cpp |
@@ -39,7 +39,7 @@ namespace blink { |
PassOwnPtrWillBeRawPtr<MutationObserverInterestGroup> MutationObserverInterestGroup::createIfNeeded(Node& target, MutationObserver::MutationType type, MutationRecordDeliveryOptions oldValueFlag, const QualifiedName* attributeName) |
{ |
ASSERT((type == MutationObserver::Attributes && attributeName) || !attributeName); |
- WillBeHeapHashMap<RawPtrWillBeMember<MutationObserver>, MutationRecordDeliveryOptions> observers; |
+ WillBeHeapHashMap<RefPtrWillBeMember<MutationObserver>, MutationRecordDeliveryOptions> observers; |
target.getRegisteredMutationObserversOfType(observers, type, attributeName); |
if (observers.isEmpty()) |
return nullptr; |
@@ -47,7 +47,7 @@ PassOwnPtrWillBeRawPtr<MutationObserverInterestGroup> MutationObserverInterestGr |
return adoptPtrWillBeNoop(new MutationObserverInterestGroup(observers, oldValueFlag)); |
} |
-MutationObserverInterestGroup::MutationObserverInterestGroup(WillBeHeapHashMap<RawPtrWillBeMember<MutationObserver>, MutationRecordDeliveryOptions>& observers, MutationRecordDeliveryOptions oldValueFlag) |
+MutationObserverInterestGroup::MutationObserverInterestGroup(WillBeHeapHashMap<RefPtrWillBeMember<MutationObserver>, MutationRecordDeliveryOptions>& observers, MutationRecordDeliveryOptions oldValueFlag) |
: m_oldValueFlag(oldValueFlag) |
{ |
ASSERT(!observers.isEmpty()); |
@@ -68,7 +68,7 @@ void MutationObserverInterestGroup::enqueueMutationRecord(PassRefPtrWillBeRawPtr |
RefPtrWillBeRawPtr<MutationRecord> mutation = prpMutation; |
RefPtrWillBeRawPtr<MutationRecord> mutationWithNullOldValue = nullptr; |
for (auto& iter : m_observers) { |
- MutationObserver* observer = iter.key; |
+ MutationObserver* observer = iter.key.get(); |
if (hasOldValue(iter.value)) { |
observer->enqueueMutationRecord(mutation); |
continue; |