Bug 1639376 - nsXMLContentSink doesn't traverse mLastTextNode. r=smaug
authorEmilio Cobos Álvarez <emilio@crisal.io>
Thu, 04 Mar 2021 16:16:10 +0000
changeset 637014 3c6cb17aa63aeb0f7c9a22e83be9095b871ad7bc
parent 637013 06452c4c828cbae9408c1d13c8c0971796f121b8
child 637015 a81fb37afb2bd7ce8b6d4b6272c505dbee4cf489
push id15212
push userffxbld-merge
push dateMon, 22 Mar 2021 14:40:41 +0000
treeherdermozilla-beta@ad9bae9bb10c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1639376
milestone88.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 1639376 - nsXMLContentSink doesn't traverse mLastTextNode. r=smaug No idea why we don't have an unlink implementation though. Differential Revision: https://phabricator.services.mozilla.com/D107233
dom/xml/nsXMLContentSink.cpp
--- a/dom/xml/nsXMLContentSink.cpp
+++ b/dom/xml/nsXMLContentSink.cpp
@@ -124,16 +124,17 @@ NS_IMPL_ADDREF_INHERITED(nsXMLContentSin
 NS_IMPL_RELEASE_INHERITED(nsXMLContentSink, nsContentSink)
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(nsXMLContentSink)
 
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(nsXMLContentSink,
                                                   nsContentSink)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mCurrentHead)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mDocElement)
+  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mLastTextNode)
   for (uint32_t i = 0, count = tmp->mContentStack.Length(); i < count; i++) {
     const StackNode& node = tmp->mContentStack.ElementAt(i);
     cb.NoteXPCOMChild(node.mContent);
   }
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mDocumentChildren)
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
 // nsIContentSink