FrameManager::SetFrameProperty(nsIFrame*            aFrame, nsIAtom*             aPropertyName, void*                aPropertyValue, NSFMPropertyDtorFunc aPropDtorFunc)
FrameManager::SetFrameProperty(nsIFrame*               aFrame, nsIAtom*                aPropertyName, void*                   aPropertyValue, NSFramePropertyDtorFunc aPropDtorFunc)
FrameManager::SetFrameProperty(nsIFrame*            aFrame,                               nsIAtom*             aPropertyName,                               void*                aPropertyValue,                               NSFMPropertyDtorFunc aPropDtorFunc){  NS_ENSURE_TRUE(mPresShell, NS_ERROR_NOT_AVAILABLE);  NS_PRECONDITION(aPropertyName && aFrame, "unexpected null param");  PropertyList* propertyList = GetPropertyListFor(aPropertyName);  if (propertyList) {    // Make sure the dtor function matches    if (aPropDtorFunc != propertyList->mDtorFunc) {      return NS_ERROR_INVALID_ARG;    }  } else {    propertyList = new PropertyList(aPropertyName, aPropDtorFunc);    if (!propertyList)      return NS_ERROR_OUT_OF_MEMORY;    if (!propertyList->mFrameValueMap.ops) {      delete propertyList;      return NS_ERROR_OUT_OF_MEMORY;    }    propertyList->mNext = mPropertyList;    mPropertyList = propertyList;  }  // The current property value (if there is one) is replaced and the current  // value is destroyed  nsresult result = NS_OK;  PropertyListMapEntry *entry = NS_STATIC_CAST(PropertyListMapEntry*,    PL_DHashTableOperate(&propertyList->mFrameValueMap, aFrame, PL_DHASH_ADD));  // A NULL entry->key is the sign that the entry has just been allocated  // for us.  If it's non-NULL then we have an existing entry.  if (entry->key && propertyList->mDtorFunc) {    nsCOMPtr<nsIPresContext> presContext;    mPresShell->GetPresContext(getter_AddRefs(presContext));    propertyList->mDtorFunc(presContext, aFrame, aPropertyName, entry->value);    result = NS_IFRAME_MGR_PROP_OVERWRITTEN;  }  entry->key = aFrame;  entry->value = aPropertyValue;  return result;}