Bug 1281702: Report the actual error message, rather than a generic one from the graphics logger. r?mchang
MozReview-Commit-ID: BT4FjWJ03wF
--- 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;