Bug 1396629 - P1. Use nsCString. r=cpearce
authorJean-Yves Avenard <jyavenard@mozilla.com>
Mon, 04 Sep 2017 21:07:11 +0200
changeset 428565 3730187f0b9bc9b5b32f149455989452181025db
parent 428564 fdb66df9fbc217386725e7adf66440f0c1f54ad5
child 428566 26d57c1276f3abc6cba8fa790a67a9c9d237fb2c
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce
bugs1396629
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1396629 - P1. Use nsCString. r=cpearce The default string is over 400 bytes long, it will never fit in the default 64 bytes buffer of an nsAutoCString. MozReview-Commit-ID: 3FHPQDgCtMF
dom/media/MediaFormatReader.cpp
--- a/dom/media/MediaFormatReader.cpp
+++ b/dom/media/MediaFormatReader.cpp
@@ -3112,17 +3112,17 @@ MediaFormatReader::GetImageContainer()
 {
   return mVideoFrameContainer ? mVideoFrameContainer->GetImageContainer()
                               : nullptr;
 }
 
 void
 MediaFormatReader::GetMozDebugReaderData(nsACString& aString)
 {
-  nsAutoCString result;
+  nsCString result;
   nsAutoCString audioDecoderName("unavailable");
   nsAutoCString videoDecoderName = audioDecoderName;
   nsAutoCString audioType("none");
   nsAutoCString videoType("none");
 
   if (HasAudio()) {
     MutexAutoLock lock(mAudio.mMutex);
     audioDecoderName = mAudio.mDescription;