msgID
msgID, "UTF-8"
MimeMessage_write_headers_html (MimeObject *obj){  MimeMessage     *msg = (MimeMessage *) obj;  nsIMimeEmitter  *mimeEmitter = GetMimeEmitter(obj->options);  int             status;#ifdef MOZ_SECURITY  HG33391#endif /* MOZ_SECURITY */    if (!obj->options || !obj->options->output_fn)  	return 0;  PR_ASSERT(obj->output_p && obj->options->write_html_p);  // No emitter - no point!  if (!mimeEmitter)     return -1;  // To support the no header option! Make sure we are not  // suppressing headers on included email messages...  if ( (obj->options->headers == MimeHeadersNone) &&       (obj == obj->options->state->root) )    return 0;  if (!obj->options->state->first_data_written_p)	{	  status = MimeObject_output_init (obj, TEXT_HTML);	  if (status < 0)     {      mimeEmitter->EndHeader();      return status;    }	  PR_ASSERT(obj->options->state->first_data_written_p);	}  // Start the header parsing by the emitter  char *msgID = MimeHeaders_get (msg->hdrs, HEADER_MESSAGE_ID,									                  PR_FALSE, PR_FALSE);  mimeEmitter->StartHeader(                             (obj == obj->options->state->root),                             (obj->options->headers == MimeHeadersOnly),                            msgID                          );  PR_FREEIF(msgID);#ifdef MOZ_SECURITY    HG00919 #endif /* MOZ_SECURITY */  status = MimeHeaders_write_all_headers (msg->hdrs, obj->options, FALSE);  if (status < 0)   {    mimeEmitter->EndHeader();    return status;  }  if (msg->xlation_stamped_p)  {#ifdef MOZ_SECURITY    HG11995#endif /* MOZ_SECURITY */	    }  else  {  /* If we're not writing a xlation stamp, and this is the outermost  message, then now is the time to run the post_header_html_fn.  (Otherwise, it will be run when the xlation-stamp is finally  closed off, in MimeXlateed_emit_buffered_child() or  MimeMultipartSigned_emit_child().)	   */    if (obj->options &&      obj->options->state &&      obj->options->generate_post_header_html_fn &&      !obj->options->state->post_header_html_run_p)    {      char *html = 0;      PR_ASSERT(obj->options->state->first_data_written_p);      html = obj->options->generate_post_header_html_fn(NULL,                                          obj->options->html_closure,                                          msg->hdrs);      obj->options->state->post_header_html_run_p = PR_TRUE;      if (html)      {        status = MimeObject_write(obj, html, PL_strlen(html), PR_FALSE);        PR_Free(html);        if (status < 0)         {          mimeEmitter->EndHeader();          return status;        }      }    }      }  mimeEmitter->EndHeader();  if (obj->options->headers == MimeHeadersOnly)    return -1;  else    return 0;}