mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:38:10 +00:00
LibCore: Put HTTP debug spam behind FOO_DEBUG macros
This commit is contained in:
parent
36bb03b6dd
commit
43a9843938
2 changed files with 12 additions and 0 deletions
|
@ -2,6 +2,8 @@
|
|||
#include <LibCore/CNetworkResponse.h>
|
||||
#include <stdio.h>
|
||||
|
||||
//#define CNETWORKJOB_DEBUG
|
||||
|
||||
CNetworkJob::CNetworkJob()
|
||||
{
|
||||
}
|
||||
|
@ -13,7 +15,9 @@ CNetworkJob::~CNetworkJob()
|
|||
void CNetworkJob::did_finish(NonnullRefPtr<CNetworkResponse>&& response)
|
||||
{
|
||||
m_response = move(response);
|
||||
#ifdef CNETWORKJOB_DEBUG
|
||||
dbg() << *this << " job did_finish!";
|
||||
#endif
|
||||
ASSERT(on_finish);
|
||||
on_finish(true);
|
||||
shutdown();
|
||||
|
@ -22,7 +26,9 @@ void CNetworkJob::did_finish(NonnullRefPtr<CNetworkResponse>&& response)
|
|||
void CNetworkJob::did_fail(Error error)
|
||||
{
|
||||
m_error = error;
|
||||
#ifdef CNETWORKJOB_DEBUG
|
||||
dbgprintf("%s{%p} job did_fail! error: %u (%s)\n", class_name(), this, (unsigned)error, to_string(error));
|
||||
#endif
|
||||
ASSERT(on_finish);
|
||||
on_finish(false);
|
||||
shutdown();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue