Bug 1328131 - reset charset since protocol object is reused by NNTP. r=mkmelin
authorJorg K <jorgk@jorgk.com>
Mon, 02 Jan 2017 14:32:00 +0100
changeset 20954 281d3a046b986dd07f8f2f1fcde8112a05cd9cbd
parent 20953 2b03b7a2ba1c45aaf384d6f4cf602f5269de67d9
child 20955 614e97c63b00c526c59a03cd261886d508ca3d97
push id12704
push usermozilla@jorgk.com
push dateTue, 03 Jan 2017 11:52:10 +0000
treeherdercomm-central@614e97c63b00 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin
bugs1328131
Bug 1328131 - reset charset since protocol object is reused by NNTP. r=mkmelin
mailnews/base/util/nsMsgProtocol.cpp
--- a/mailnews/base/util/nsMsgProtocol.cpp
+++ b/mailnews/base/util/nsMsgProtocol.cpp
@@ -73,16 +73,20 @@ nsresult nsMsgProtocol::InitFromURI(nsIU
   nsCOMPtr <nsIMsgMailNewsUrl> mailUrl = do_QueryInterface(aUrl);
   if (mailUrl)
   {
     mailUrl->GetLoadGroup(getter_AddRefs(m_loadGroup));
     nsCOMPtr<nsIMsgStatusFeedback> statusFeedback;
     mailUrl->GetStatusFeedback(getter_AddRefs(statusFeedback));
     mProgressEventSink = do_QueryInterface(statusFeedback);
   }
+
+  // Reset channel data in case the object is reused and initialised again.
+  mCharset.Truncate();
+
   return NS_OK;
 }
 
 nsMsgProtocol::~nsMsgProtocol()
 {}
 
 
 static bool gGotTimeoutPref;