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

Unified Diff: Source/core/dom/MutationRecord.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/MutationRecord.cpp
diff --git a/Source/core/dom/MutationRecord.cpp b/Source/core/dom/MutationRecord.cpp
index 77c6f393073f7aca9fef497dd8647b386e1d189e..7cb4a4d9adc7638927845cc9fe7cc9eeaa06556e 100644
--- a/Source/core/dom/MutationRecord.cpp
+++ b/Source/core/dom/MutationRecord.cpp
@@ -126,11 +126,17 @@ private:
class MutationRecordWithNullOldValue : public MutationRecord {
public:
- MutationRecordWithNullOldValue(PassRefPtr<MutationRecord> record)
+ MutationRecordWithNullOldValue(PassRefPtrWillBeRawPtr<MutationRecord> record)
: m_record(record)
{
}
+ virtual void trace(Visitor* visitor) OVERRIDE
+ {
+ visitor->trace(m_record);
+ MutationRecord::trace(visitor);
+ }
+
private:
virtual const AtomicString& type() OVERRIDE { return m_record->type(); }
virtual Node* target() OVERRIDE { return m_record->target(); }
@@ -143,7 +149,7 @@ private:
virtual String oldValue() OVERRIDE { return String(); }
- RefPtr<MutationRecord> m_record;
+ RefPtrWillBeMember<MutationRecord> m_record;
};
const AtomicString& ChildListRecord::type()
@@ -166,24 +172,24 @@ const AtomicString& CharacterDataRecord::type()
} // namespace
-PassRefPtr<MutationRecord> MutationRecord::createChildList(PassRefPtr<Node> target, PassRefPtr<NodeList> added, PassRefPtr<NodeList> removed, PassRefPtr<Node> previousSibling, PassRefPtr<Node> nextSibling)
+PassRefPtrWillBeRawPtr<MutationRecord> MutationRecord::createChildList(PassRefPtr<Node> target, PassRefPtr<NodeList> added, PassRefPtr<NodeList> removed, PassRefPtr<Node> previousSibling, PassRefPtr<Node> nextSibling)
{
- return adoptRef(new ChildListRecord(target, added, removed, previousSibling, nextSibling));
+ return adoptRefWillBeNoop(new ChildListRecord(target, added, removed, previousSibling, nextSibling));
}
-PassRefPtr<MutationRecord> MutationRecord::createAttributes(PassRefPtr<Node> target, const QualifiedName& name, const AtomicString& oldValue)
+PassRefPtrWillBeRawPtr<MutationRecord> MutationRecord::createAttributes(PassRefPtr<Node> target, const QualifiedName& name, const AtomicString& oldValue)
{
- return adoptRef(new AttributesRecord(target, name, oldValue));
+ return adoptRefWillBeNoop(new AttributesRecord(target, name, oldValue));
}
-PassRefPtr<MutationRecord> MutationRecord::createCharacterData(PassRefPtr<Node> target, const String& oldValue)
+PassRefPtrWillBeRawPtr<MutationRecord> MutationRecord::createCharacterData(PassRefPtr<Node> target, const String& oldValue)
{
- return adoptRef(new CharacterDataRecord(target, oldValue));
+ return adoptRefWillBeNoop(new CharacterDataRecord(target, oldValue));
}
-PassRefPtr<MutationRecord> MutationRecord::createWithNullOldValue(PassRefPtr<MutationRecord> record)
+PassRefPtrWillBeRawPtr<MutationRecord> MutationRecord::createWithNullOldValue(PassRefPtrWillBeRawPtr<MutationRecord> record)
{
- return adoptRef(new MutationRecordWithNullOldValue(record));
+ return adoptRefWillBeNoop(new MutationRecordWithNullOldValue(record));
}
MutationRecord::~MutationRecord()

Powered by Google App Engine
This is Rietveld 408576698