void MutationObserverInterestGroup::enqueueMutationRecord(PassRefPtr<MutationRecord> prpMutation) { RefPtr<MutationRecord> mutation = prpMutation; RefPtr<MutationRecord> mutationWithNullOldValue = nullptr; for (HashMap<RawPtr<MutationObserver>, MutationRecordDeliveryOptions>::iterator iter = m_observers.begin(); iter != m_observers.end(); ++iter) { MutationObserver* observer = iter->key; if (hasOldValue(iter->value)) { observer->enqueueMutationRecord(mutation); continue; } if (!mutationWithNullOldValue) { if (mutation->oldValue().isNull()) mutationWithNullOldValue = mutation; else mutationWithNullOldValue = MutationRecord::createWithNullOldValue(mutation).get(); } observer->enqueueMutationRecord(mutationWithNullOldValue); } }
void MutationObserverInterestGroup::enqueueMutationRecord(PassRefPtrWillBeRawPtr<MutationRecord> prpMutation) { RefPtrWillBeRawPtr<MutationRecord> mutation = prpMutation; RefPtrWillBeRawPtr<MutationRecord> mutationWithNullOldValue = nullptr; for (auto& iter : m_observers) { MutationObserver* observer = iter.key; if (hasOldValue(iter.value)) { observer->enqueueMutationRecord(mutation); continue; } if (!mutationWithNullOldValue) { if (mutation->oldValue().isNull()) mutationWithNullOldValue = mutation; else mutationWithNullOldValue = MutationRecord::createWithNullOldValue(mutation).get(); } observer->enqueueMutationRecord(mutationWithNullOldValue); } }