mCachedStyleData.mResetData = new (presContext.get()) nsResetStyleData;
mCachedStyleData.mResetData = new (presContext) nsResetStyleData;
nsStyleContext::SetStyle(nsStyleStructID aSID, nsStyleStruct* aStruct){  // This method should only be called from nsRuleNode!  It is not a public  // method!    NS_ASSERTION(aSID >= 0 && aSID < nsStyleStructID_Length, "out of bounds");  // NOTE:  nsCachedStyleData::GetStyleData works roughly the same way.  // See the comments there (in nsRuleNode.h) for more details about  // what this is doing and why.  const nsCachedStyleData::StyleStructInfo& info =      nsCachedStyleData::gInfo[aSID];  char* resetOrInheritSlot = NS_REINTERPRET_CAST(char*, &mCachedStyleData) +                             info.mCachedStyleDataOffset;  char* resetOrInherit = NS_REINTERPRET_CAST(char*,      *NS_REINTERPRET_CAST(void**, resetOrInheritSlot));  if (!resetOrInherit) {    nsCOMPtr<nsIPresContext> presContext;    mRuleNode->GetPresContext(getter_AddRefs(presContext));    if (mCachedStyleData.IsReset(aSID)) {      mCachedStyleData.mResetData = new (presContext.get()) nsResetStyleData;      resetOrInherit = NS_REINTERPRET_CAST(char*, mCachedStyleData.mResetData);    } else {      mCachedStyleData.mInheritedData =          new (presContext.get()) nsInheritedStyleData;      resetOrInherit =          NS_REINTERPRET_CAST(char*, mCachedStyleData.mInheritedData);    }  }  char* dataSlot = resetOrInherit + info.mInheritResetOffset;  *NS_REINTERPRET_CAST(nsStyleStruct**, dataSlot) = aStruct;  return NS_OK;}