nsIFrame* oldPrimaryFrame;  oldPrimaryFrame = (nsIFrame*)mPrimaryFrameMap->Insert(aContent, (void*)aPrimaryFrame); #ifdef NS_DEBUG if (oldPrimaryFrame && (oldPrimaryFrame != aPrimaryFrame)) { NS_WARNING("overwriting current primary frame"); } #endif
mPrimaryFrameMap->Insert(aContent, (void*)aPrimaryFrame);
FrameManager::SetPrimaryFrameFor(nsIContent* aContent,                                 nsIFrame*   aPrimaryFrame){  NS_PRECONDITION(aContent, "no content object");  // If aPrimaryFrame is NULL, then remove the mapping  if (!aPrimaryFrame) {    if (mPrimaryFrameMap) {      mPrimaryFrameMap->Remove(aContent);    }  } else {    // Create a new DST if necessary    if (!mPrimaryFrameMap) {      mPrimaryFrameMap = new nsDST;      if (!mPrimaryFrameMap) {        return NS_ERROR_OUT_OF_MEMORY;      }    }    // Add a mapping to the hash table    nsIFrame* oldPrimaryFrame;         oldPrimaryFrame = (nsIFrame*)mPrimaryFrameMap->Insert(aContent, (void*)aPrimaryFrame);#ifdef NS_DEBUG    if (oldPrimaryFrame && (oldPrimaryFrame != aPrimaryFrame)) {      NS_WARNING("overwriting current primary frame");    }#endif  }  return NS_OK;}