else { psd = new PerSpanData; if (nsnull == psd) { return NS_ERROR_OUT_OF_MEMORY; } }
psd = NS_REINTERPRET_CAST(PerSpanData*, mem);
nsLineLayout::NewPerSpanData(PerSpanData** aResult){  PerSpanData* psd = mSpanFreeList;  if (nsnull == psd) {    if (mInitialSpansFreed < NS_LINELAYOUT_NUM_SPANS) {      // use one of the ones defined in our struct...      psd = &mSpanDataBuf[mInitialSpansFreed++];    }    else {      psd = new PerSpanData;      if (nsnull == psd) {        return NS_ERROR_OUT_OF_MEMORY;      }    }  }  else {    mSpanFreeList = psd->mNextFreeSpan;  }  psd->mParent = nsnull;  psd->mFrame = nsnull;  psd->mFirstFrame = nsnull;  psd->mLastFrame = nsnull;  psd->mContainsFloat = PR_FALSE;  psd->mZeroEffectiveSpanBox = PR_FALSE;#ifdef DEBUG  mSpansAllocated++;#endif  *aResult = psd;  return NS_OK;}