bug 1514802, break down MutationRecords list so that cycle collector can delete the objects sooner, r=mccr8
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Mon, 31 Dec 2018 19:13:13 +0200
changeset 509310 13191d88873d83a81b29cf5a7cc7a5be025faecd
parent 509309 c60891fb93f5ba82e91dc5036b6905f26b3f5d42
child 509311 8d7092d3884f197a5679a44ad6101621af72f825
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8
bugs1514802
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 1514802, break down MutationRecords list so that cycle collector can delete the objects sooner, r=mccr8
dom/base/nsDOMMutationObserver.cpp
--- a/dom/base/nsDOMMutationObserver.cpp
+++ b/dom/base/nsDOMMutationObserver.cpp
@@ -51,17 +51,20 @@ nsINodeList* nsDOMMutationRecord::Remove
 }
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsDOMMutationRecord)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(nsDOMMutationRecord)
-NS_IMPL_CYCLE_COLLECTING_RELEASE(nsDOMMutationRecord)
+// Break down the linked list so that cycle collector can delete the
+// objects sooner.
+NS_IMPL_CYCLE_COLLECTING_RELEASE_WITH_LAST_RELEASE(nsDOMMutationRecord,
+                                                   mNext = nullptr)
 
 NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(nsDOMMutationRecord, mTarget,
                                       mPreviousSibling, mNextSibling,
                                       mAddedNodes, mRemovedNodes,
                                       mAddedAnimations, mRemovedAnimations,
                                       mChangedAnimations, mNext, mOwner)
 
 // Observer