mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 633462: Nuke this printf in release builds. r=bent a=a
This commit is contained in:
parent
b74ffe8e85
commit
a36a04c6d1
@ -368,6 +368,15 @@ AsyncChannel::Clear()
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
PrintErrorMessage(bool isChild, const char* channelName, const char* msg)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "\n###!!! [%s][%s] Error: %s\n\n",
|
||||
isChild ? "Child" : "Parent", channelName, msg);
|
||||
#endif
|
||||
}
|
||||
|
||||
bool
|
||||
AsyncChannel::MaybeHandleError(Result code, const char* channelName)
|
||||
{
|
||||
@ -400,7 +409,7 @@ AsyncChannel::MaybeHandleError(Result code, const char* channelName)
|
||||
return false;
|
||||
}
|
||||
|
||||
PrintErrorMessage(channelName, errorMsg);
|
||||
PrintErrorMessage(mChild, channelName, errorMsg);
|
||||
|
||||
mListener->OnProcessingError(code);
|
||||
|
||||
@ -432,7 +441,7 @@ AsyncChannel::ReportConnectionError(const char* channelName) const
|
||||
NS_RUNTIMEABORT("unreached");
|
||||
}
|
||||
|
||||
PrintErrorMessage(channelName, errorMsg);
|
||||
PrintErrorMessage(mChild, channelName, errorMsg);
|
||||
|
||||
mListener->OnProcessingError(MsgDropped);
|
||||
}
|
||||
|
@ -160,12 +160,6 @@ protected:
|
||||
bool MaybeHandleError(Result code, const char* channelName);
|
||||
void ReportConnectionError(const char* channelName) const;
|
||||
|
||||
void PrintErrorMessage(const char* channelName, const char* msg) const
|
||||
{
|
||||
fprintf(stderr, "\n###!!! [%s][%s] Error: %s\n\n",
|
||||
mChild ? "Child" : "Parent", channelName, msg);
|
||||
}
|
||||
|
||||
// Run on the worker thread
|
||||
|
||||
void SendThroughTransport(Message* msg) const;
|
||||
|
Loading…
Reference in New Issue
Block a user