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:
@@ -83,8 +83,12 @@
|
||||
|
||||
// Logging of debug output
|
||||
#define FORCE_PR_LOG /* Allow logging in the release build */
|
||||
#include "prlog.h"
|
||||
PRLogModuleInfo* nsComponentManagerLog = NULL;
|
||||
|
||||
#include "nslog.h"
|
||||
|
||||
NS_IMPL_LOG(nsComponentManagerLog)
|
||||
#define PRINTF NS_LOG_PRINTF(nsComponentManagerLog)
|
||||
#define FLUSH NS_LOG_FLUSH(nsComponentManagerLog)
|
||||
|
||||
// Enable printing of critical errors on screen even for release builds
|
||||
#define PRINT_CRITICAL_ERROR_TO_SCREEN
|
||||
@@ -275,12 +279,8 @@ nsresult nsComponentManagerImpl::Init(void)
|
||||
|
||||
mShuttingDown = NS_SHUTDOWN_NEVERHAPPENED;
|
||||
|
||||
if (nsComponentManagerLog == NULL)
|
||||
{
|
||||
nsComponentManagerLog = PR_NewLogModule("nsComponentManager");
|
||||
PR_LOG(nsComponentManagerLog, PR_LOG_ALWAYS,
|
||||
("xpcom-log-version : " NS_XPCOM_COMPONENT_MANAGER_VERSION_STRING));
|
||||
}
|
||||
PR_LOG(nsComponentManagerLog, PR_LOG_ALWAYS,
|
||||
("xpcom-log-version : " NS_XPCOM_COMPONENT_MANAGER_VERSION_STRING));
|
||||
|
||||
if (mFactories == NULL) {
|
||||
mFactories = new nsObjectHashtable(nsnull, nsnull, // should never be copied
|
||||
@@ -901,7 +901,7 @@ nsresult nsComponentManagerImpl::PlatformPrePopulateRegistry()
|
||||
// put the {contractid, Cid} mapping into our map
|
||||
nsCStringKey key(contractidString);
|
||||
mContractIDs->Put(&key, aClass);
|
||||
// printf("Populating [ %s, %s ]\n", cidString, contractidString);
|
||||
// PRINTF("Populating [ %s, %s ]\n", cidString, contractidString);
|
||||
}
|
||||
|
||||
(void)mRegistry->SetBufferSize( 10*1024 );
|
||||
@@ -1270,7 +1270,7 @@ MakeRegistryName(const char *aDllName, const char *prefix, char **regName)
|
||||
*regName = registryName;
|
||||
|
||||
#ifdef DEBUG_shaver_off
|
||||
fprintf(stderr, "MakeRegistryName(%s, %s, &[%s])\n",
|
||||
PRINTF("MakeRegistryName(%s, %s, &[%s])\n",
|
||||
aDllName, prefix, *regName);
|
||||
#endif
|
||||
|
||||
@@ -1833,10 +1833,8 @@ CanUnload_enumerate(nsHashKey *key, void *aData, void *aClosure)
|
||||
(struct CanUnload_closure *)aClosure;
|
||||
|
||||
if (loader == closure->native) {
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "CanUnload_enumerate: skipping native\n");
|
||||
#endif
|
||||
return PR_TRUE;
|
||||
PRINTF("CanUnload_enumerate: skipping native\n");
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
closure->status = loader->UnloadAll(closure->when);
|
||||
|
||||
Reference in New Issue
Block a user