Bug 1281702: Report the actual error message, rather than a generic one from the graphics logger. r=mchang
authorMilan Sreckovic <milan@mozilla.com>
Mon, 18 Jul 2016 16:35:35 -0400
changeset 345862 3f45d79f6bc73785d1809c6ed084138fca1bb1fe
parent 345861 76631f34f9bcfb8b9366200fc541f6d44a024ebb
child 345863 c6d147ba37b52dd368bc213580e1bec9f3f71e0d
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmchang
bugs1281702
milestone50.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 1281702: Report the actual error message, rather than a generic one from the graphics logger. r=mchang MozReview-Commit-ID: BT4FjWJ03wF
gfx/2d/Logging.h
--- a/gfx/2d/Logging.h
+++ b/gfx/2d/Logging.h
@@ -496,19 +496,24 @@ private:
       }
       mMessage << "]: ";
     }
   }
 
   void WriteLog(const std::string &aString) {
     if (MOZ_UNLIKELY(LogIt())) {
       Logger::OutputMessage(aString, L, NoNewline());
+      // Assert if required.  We don't have a three parameter MOZ_ASSERT
+      // so use the underlying functions instead (see bug 1281702):
+#ifdef DEBUG
       if (mOptions & int(LogOptions::AssertOnCall)) {
-        MOZ_ASSERT(false, "An assert from the graphics logger");
+        MOZ_ReportAssertionFailure(aString.c_str(), __FILE__, __LINE__);
+        MOZ_CRASH("GFX: An assert from the graphics logger");
       }
+#endif
       if ((mOptions & int(LogOptions::CrashAction)) && ValidReason()) {
         Logger::CrashAction(mReason);
       }
     }
   }
 
   std::stringstream mMessage;
   int mOptions;