Bug 1000974 - Don't do cycle collector optimization for nodes in the shadow tree. r=smaug
authorAndrew McCreight <continuation@gmail.com>
Fri, 25 Apr 2014 09:12:26 -0700
changeset 180586 eae1708cbfdb77fcc06b2f631239262beab649ab
parent 180585 f97d1a5bbd67094785096356371327b38a859e53
child 180587 2e5620659891fb324e0228b24f2fe6e7bee1f1c3
push id272
push userpvanderbeken@mozilla.com
push dateMon, 05 May 2014 16:31:18 +0000
reviewerssmaug
bugs1000974
milestone31.0a1
Bug 1000974 - Don't do cycle collector optimization for nodes in the shadow tree. r=smaug
content/base/src/nsINode.cpp
--- a/content/base/src/nsINode.cpp
+++ b/content/base/src/nsINode.cpp
@@ -1281,17 +1281,18 @@ nsINode::GetOwnerGlobal()
 }
 
 bool
 nsINode::UnoptimizableCCNode() const
 {
   const uintptr_t problematicFlags = (NODE_IS_ANONYMOUS_ROOT |
                                       NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE |
                                       NODE_IS_NATIVE_ANONYMOUS_ROOT |
-                                      NODE_MAY_BE_IN_BINDING_MNGR);
+                                      NODE_MAY_BE_IN_BINDING_MNGR |
+                                      NODE_IS_IN_SHADOW_TREE);
   return HasFlag(problematicFlags) ||
          NodeType() == nsIDOMNode::ATTRIBUTE_NODE ||
          // For strange cases like xbl:content/xbl:children
          (IsElement() &&
           AsElement()->IsInNamespace(kNameSpaceID_XBL));
 }
 
 /* static */