Bug 633462: Nuke this printf in release builds. r=bent a=a

This commit is contained in:
Chris Jones 2011-02-23 11:45:09 -06:00
parent b74ffe8e85
commit a36a04c6d1
2 changed files with 11 additions and 8 deletions

View File

@ -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);
}

View File

@ -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;