Bug 1472431, nodes in Shadow DOM aren't orphan, if they are in composed document, r=mccr8
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Sun, 01 Jul 2018 22:28:17 +0300
changeset 479709 e6aade23df68e16604e13eec792b588417845f92
parent 479708 c25668460f0d55d3bd2481508f45c55142fd31e5
child 479710 970eb8cb67de1ce7c48de501931d2d10c8596a9b
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8
bugs1472431
milestone63.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 1472431, nodes in Shadow DOM aren't orphan, if they are in composed document, r=mccr8
js/xpconnect/src/XPCJSRuntime.cpp
--- a/js/xpconnect/src/XPCJSRuntime.cpp
+++ b/js/xpconnect/src/XPCJSRuntime.cpp
@@ -2098,17 +2098,17 @@ class OrphanReporter : public JS::Object
 
     virtual size_t sizeOfIncludingThis(nsISupports* aSupports) override
     {
         size_t n = 0;
         nsCOMPtr<nsINode> node = do_QueryInterface(aSupports);
         // https://bugzilla.mozilla.org/show_bug.cgi?id=773533#c11 explains
         // that we have to skip XBL elements because they violate certain
         // assumptions.  Yuk.
-        if (node && !node->IsInUncomposedDoc() &&
+        if (node && !node->IsInComposedDoc() &&
             !(node->IsElement() && node->AsElement()->IsInNamespace(kNameSpaceID_XBL)))
         {
             // This is an orphan node.  If we haven't already handled the
             // sub-tree that this node belongs to, measure the sub-tree's size
             // and then record its root so we don't measure it again.
             nsCOMPtr<nsINode> orphanTree = node->SubtreeRoot();
             if (orphanTree && !mState.HaveSeenPtr(orphanTree.get())) {
                 n += SizeOfTreeIncludingThis(orphanTree);