func:  XULContentSinkImpl::AddText(const char16_t* int32_t aLength) if ( 0 == mTextSize )  mText = ( char16_t * ) malloc ( sizeof ( char16_t ) * 4096 ); if ( nullptr == mText )  mTextSize = 4096; int32_t offset = 0 ; while ( 0 != aLength )  int32_t amount = mTextSize - mTextLength ; if ( amount > aLength )  amount = aLength; if ( 0 == amount )  if ( mConstrainSize )  nsresult rv = FlushText ( ) ; if ( NS_OK != rv )  mTextSize += aLength; mText = ( char16_t * ) realloc ( mText , sizeof ( char16_t ) * mTextSize ); if ( nullptr == mText )  memcpy ( & mText [ mTextLength ] , aText + offset , sizeof ( char16_t ) * amount ); mTextLength += amount; offset += amount; aLength -= amount; 