Bug 1403832 - part2 : reuse ErrorName() in MediaResult::Description(). r=jya
authorAlastor Wu <alwu@mozilla.com>
Fri, 29 Sep 2017 00:37:50 +0800
changeset 383512 30d8969e3ec6ea2d21a0542cc83708ee64dab283
parent 383511 89061adfacb3d6ac68b093087fd7ea4be828e5cc
child 383513 8063ebcb25dbdf541b6cc9dd71216219fb42ffb5
push id32594
push userkwierso@gmail.com
push dateThu, 28 Sep 2017 22:49:33 +0000
treeherdermozilla-central@6dea0ee45b66 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjya
bugs1403832
milestone58.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 1403832 - part2 : reuse ErrorName() in MediaResult::Description(). r=jya MozReview-Commit-ID: AN6v18RwlAw
dom/media/MediaResult.h
--- a/dom/media/MediaResult.h
+++ b/dom/media/MediaResult.h
@@ -56,20 +56,18 @@ public:
   bool operator!=(nsresult aResult) const { return aResult != mCode; }
   operator nsresult () const { return mCode; }
 
   nsCString Description() const
   {
     if (NS_SUCCEEDED(mCode)) {
       return nsCString();
     }
-    nsCString name;
-    GetErrorName(mCode, name);
     return nsPrintfCString("%s (0x%08" PRIx32 ")%s%s",
-                           name.get(),
+                           ErrorName().get(),
                            static_cast<uint32_t>(mCode),
                            mMessage.IsEmpty() ? "" : " - ",
                            mMessage.get());
   }
 
   void SetGPUCrashTimeStamp(const TimeStamp& aTime) { mGPUCrashTimeStamp = aTime; }
   const TimeStamp& GPUCrashTimeStamp() const { return mGPUCrashTimeStamp; }