Fix for bug 500850 (Make inline style use wrapper cache and slimwrappers), add unlinking. r/sr=bz.
authorPeter Van der Beken <peterv@propagandism.org>
Mon, 10 Aug 2009 16:15:49 +0200
changeset 31394 a8c89c6a48e60f6dc96b58a9c16fa3f9ad8618d3
parent 31393 a4c48ea78e74e4bca58181217701a4028a162fea
child 31395 f67bf1318100a5e1acf8efd7dcef5fa7cede380f
push id8521
push userpvanderbeken@mozilla.com
push dateWed, 12 Aug 2009 17:08:53 +0000
treeherdermozilla-central@f67bf1318100 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs500850
milestone1.9.2a2pre
Fix for bug 500850 (Make inline style use wrapper cache and slimwrappers), add unlinking. r/sr=bz.
content/base/src/nsGenericElement.cpp
layout/style/nsComputedDOMStyle.cpp
--- a/content/base/src/nsGenericElement.cpp
+++ b/content/base/src/nsGenericElement.cpp
@@ -4028,16 +4028,17 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(ns
       }
     }
   }  
 
   // Unlink any DOM slots of interest.
   {
     nsDOMSlots *slots = tmp->GetExistingDOMSlots();
     if (slots) {
+      slots->mStyle = nsnull;
       if (slots->mAttributeMap) {
         slots->mAttributeMap->DropReference();
         slots->mAttributeMap = nsnull;
       }
       if (tmp->IsNodeOfType(nsINode::eXUL))
         NS_IF_RELEASE(slots->mControllers);
       slots->mChildrenList = nsnull;
     }
--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -150,21 +150,24 @@ nsComputedDOMStyle::Shutdown()
   sCachedComputedDOMStyle = nsnull;
 }
 
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(nsComputedDOMStyle)
 NS_IMPL_CYCLE_COLLECTION_ROOT_BEGIN(nsComputedDOMStyle)
   NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER
 NS_IMPL_CYCLE_COLLECTION_ROOT_END
-NS_IMPL_CYCLE_COLLECTION_UNLINK_0(nsComputedDOMStyle)
+NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsComputedDOMStyle)
+  NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mContent)
+NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN(nsComputedDOMStyle)
   NS_IMPL_CYCLE_COLLECTION_TRACE_PRESERVED_WRAPPER
 NS_IMPL_CYCLE_COLLECTION_TRACE_END
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(nsComputedDOMStyle)
+  NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mContent)
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
 // QueryInterface implementation for nsComputedDOMStyle
 NS_INTERFACE_TABLE_HEAD(nsComputedDOMStyle)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_OFFSET_AND_INTERFACE_TABLE_BEGIN(nsComputedDOMStyle)
     NS_INTERFACE_TABLE_ENTRY(nsComputedDOMStyle, nsICSSDeclaration)