Bug 1667015 - Output full path of source code files with NS_DebugBreak. r=dom-workers-and-storage-reviewers,asuth

Differential Revision: https://phabricator.services.mozilla.com/D91240
This commit is contained in:
Simon Giesecke 2020-10-23 00:57:07 +00:00
parent ce8b2c945f
commit 58611a371f

View File

@ -229,13 +229,13 @@ void LogError(const nsLiteralCString& aModule, const nsACString& aExpr,
#endif
#ifdef DEBUG
NS_DebugBreak(
NS_DEBUG_WARNING, nsAutoCString(aModule + " failure"_ns).get(),
(extraInfosString.IsEmpty() ? nsPromiseFlatCString(aExpr)
: static_cast<const nsCString&>(nsAutoCString(
aExpr + extraInfosString)))
.get(),
nsPromiseFlatCString(GetLeafName(aSourceFile)).get(), aSourceLine);
NS_DebugBreak(NS_DEBUG_WARNING, nsAutoCString(aModule + " failure"_ns).get(),
(extraInfosString.IsEmpty()
? nsPromiseFlatCString(aExpr)
: static_cast<const nsCString&>(
nsAutoCString(aExpr + extraInfosString)))
.get(),
nsPromiseFlatCString(aSourceFile).get(), aSourceLine);
#endif
#if defined(EARLY_BETA_OR_EARLIER) || defined(DEBUG)