Bug 1411744 - ESR only: Move variable declaration to original location to fix compile error. r+a=me
authorJorg K
Tue, 21 Nov 2017 17:17:55 +0100
changeset 28102 d4e6767007b3b0c92c57ea57f3532ad55f211b9f
parent 28101 289ea9824da11403726c71893617414500bf86b6
child 28103 49755a7bb25b7a2c48b664e29cc63ecf40488d53
push id1996
push usermozilla@jorgk.com
push dateTue, 21 Nov 2017 16:18:25 +0000
treeherdercomm-esr52@d4e6767007b3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1411744
Bug 1411744 - ESR only: Move variable declaration to original location to fix compile error. r+a=me
mailnews/mime/src/mimedrft.cpp
--- a/mailnews/mime/src/mimedrft.cpp
+++ b/mailnews/mime/src/mimedrft.cpp
@@ -1335,26 +1335,26 @@ mime_parse_stream_complete (nsMIMESessio
         else
           //We cannot use this kind of data for the message body! Therefore, move it as attachment
           bodyAsAttachment = true;
       }
       else
         composeFormat = nsIMsgCompFormat::PlainText;
 
       char *body = nullptr;
+      uint32_t bodyLen = 0;
 
       if (!bodyAsAttachment && mdd->messageBody->m_tmpFile)
       {
         int64_t fileSize;
         nsCOMPtr<nsIFile> tempFileCopy;
         mdd->messageBody->m_tmpFile->Clone(getter_AddRefs(tempFileCopy));
         mdd->messageBody->m_tmpFile = do_QueryInterface(tempFileCopy);
         tempFileCopy = nullptr;
         mdd->messageBody->m_tmpFile->GetFileSize(&fileSize);
-        uint32_t bodyLen = 0;
 
         // The stream interface can only read up to 4GB (32bit uint).
         // It is highly unlikely to encounter a body lager than that limit,
         // so we just skip it instead of reading it in chunks.
         if (fileSize < UINT32_MAX)
         {
           bodyLen = fileSize;
           body = (char *)PR_MALLOC(bodyLen + 1);