Bug 47207. Changing printf to PRINTF to use new logging facility. r=valeski,sr=waterson
git-svn-id: svn://10.0.0.236/trunk@81885 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -115,29 +115,23 @@ typedef unsigned long HMTX;
|
||||
|
||||
#define SH_IN_FRAMES 1
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
/**
|
||||
* Note: the log module is created during initialization which
|
||||
* means that you cannot perform logging before then.
|
||||
*/
|
||||
static PRLogModuleInfo* gLogModule = PR_NewLogModule("webshell");
|
||||
#endif
|
||||
#include "nslog.h"
|
||||
#undef PRINTF
|
||||
#undef FLUSH
|
||||
|
||||
#define WEB_TRACE_CALLS 0x1
|
||||
#define WEB_TRACE_HISTORY 0x2
|
||||
NS_IMPL_LOG(nsWebShellLog)
|
||||
#define PRINTF NS_LOG_PRINTF(nsWebShellLog)
|
||||
#define FLUSH NS_LOG_FLUSH(nsWebShellLog)
|
||||
|
||||
#define WEB_LOG_TEST(_lm,_bit) (PRIntn((_lm)->level) & (_bit))
|
||||
#define gLogModule nsWebShellLog
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
#define WEB_TRACE(_bit,_args) \
|
||||
PR_BEGIN_MACRO \
|
||||
if (WEB_LOG_TEST(gLogModule,_bit)) { \
|
||||
PR_LogPrint _args; \
|
||||
} \
|
||||
PR_END_MACRO
|
||||
#else
|
||||
#define WEB_TRACE(_bit,_args)
|
||||
#endif
|
||||
NS_IMPL_LOG(nsWebShellCallsLog)
|
||||
#define CALLS_PRINTF NS_LOG_PRINTF(nsWebShellCallsLog)
|
||||
#define CALLS_FLUSH NS_LOG_FLUSH(nsWebShellCallsLog)
|
||||
|
||||
//NS_IMPL_LOG(nsWebShellHistoryLog)
|
||||
//#define HISTORY_PRINTF NS_LOG_PRINTF(nsWebShellHistoryLog)
|
||||
//#define HISTORY_FLUSH NS_LOG_FLUSH(nsWebShellHistoryLog)
|
||||
|
||||
//static NS_DEFINE_CID(kGlobalHistoryCID, NS_GLOBALHISTORY_CID);
|
||||
//static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
|
||||
@@ -160,9 +154,7 @@ nsWebShell::nsWebShell() : nsDocShell()
|
||||
// We're counting the number of |nsWebShells| to help find leaks
|
||||
++gNumberOfWebShells;
|
||||
#endif
|
||||
#ifdef DEBUG
|
||||
printf("WEBSHELL+ = %ld\n", gNumberOfWebShells);
|
||||
#endif
|
||||
PRINTF("WEBSHELL+ = %ld\n", gNumberOfWebShells);
|
||||
|
||||
NS_INIT_REFCNT();
|
||||
mThreadEventQueue = nsnull;
|
||||
@@ -212,9 +204,7 @@ nsWebShell::~nsWebShell()
|
||||
// We're counting the number of |nsWebShells| to help find leaks
|
||||
--gNumberOfWebShells;
|
||||
#endif
|
||||
#ifdef DEBUG
|
||||
printf("WEBSHELL- = %ld\n", gNumberOfWebShells);
|
||||
#endif
|
||||
PRINTF("WEBSHELL- = %ld\n", gNumberOfWebShells);
|
||||
}
|
||||
|
||||
void nsWebShell::InitFrameData()
|
||||
@@ -1201,7 +1191,7 @@ nsWebShell::OnEndURLLoad(nsIDocumentLoader* loader,
|
||||
#if 0
|
||||
const char* spec;
|
||||
aURL->GetSpec(&spec);
|
||||
printf("nsWebShell::OnEndURLLoad:%p: loader=%p url=%s status=%d\n", this, loader, spec, aStatus);
|
||||
PRINTF("nsWebShell::OnEndURLLoad:%p: loader=%p url=%s status=%d\n", this, loader, spec, aStatus);
|
||||
#endif
|
||||
/*
|
||||
*Fire the OnEndDocumentLoad of the webshell observer
|
||||
@@ -1367,8 +1357,7 @@ NS_IMETHODIMP nsWebShell::Create()
|
||||
NS_ENSURE_SUCCESS(eventService->GetThreadEventQueue(NS_CURRENT_THREAD,
|
||||
&mThreadEventQueue), NS_ERROR_FAILURE);
|
||||
|
||||
WEB_TRACE(WEB_TRACE_CALLS,
|
||||
("nsWebShell::Init: this=%p", this));
|
||||
CALLS_PRINTF("nsWebShell::Init: this=%p", this);
|
||||
|
||||
// HACK....force the uri loader to give us a load cookie for this webshell...then get it's
|
||||
// doc loader and store it...as more of the docshell lands, we'll be able to get rid
|
||||
|
||||
Reference in New Issue
Block a user