Bug 47207. Changing printf to PRINTF to use new logging facility. r=valeski,sr=waterson
This commit is contained in:
@@ -50,6 +50,11 @@
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsIProgressEventSink.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nslog.h"
|
||||
|
||||
NS_IMPL_LOG(nsPluginHostImplLog, 0)
|
||||
#define PRINTF NS_LOG_PRINTF(nsPluginHostImplLog)
|
||||
#define FLUSH NS_LOG_FLUSH(nsPluginHostImplLog)
|
||||
|
||||
// Friggin' X11 has to "#define None". Lame!
|
||||
#ifdef None
|
||||
@@ -981,7 +986,7 @@ nsPluginStreamListenerPeer::~nsPluginStreamListenerPeer()
|
||||
{
|
||||
char* spec;
|
||||
(void)mURL->GetSpec(&spec);
|
||||
printf("killing stream for %s\n", mURL ? spec : "(unknown URL)");
|
||||
PRINTF("killing stream for %s\n", mURL ? spec : "(unknown URL)");
|
||||
nsCRT::free(spec);
|
||||
}
|
||||
#endif
|
||||
@@ -1037,7 +1042,7 @@ nsresult nsPluginStreamListenerPeer::Initialize(nsIURI *aURL,
|
||||
#ifdef NS_DEBUG
|
||||
char* spec;
|
||||
(void)aURL->GetSpec(&spec);
|
||||
printf("created stream for %s\n", spec);
|
||||
PRINTF("created stream for %s\n", spec);
|
||||
nsCRT::free(spec);
|
||||
#endif
|
||||
|
||||
@@ -1070,7 +1075,7 @@ nsresult nsPluginStreamListenerPeer::InitializeEmbeded(nsIURI *aURL,
|
||||
#ifdef NS_DEBUG
|
||||
char* spec;
|
||||
(void)aURL->GetSpec(&spec);
|
||||
printf("created stream for %s\n", spec);
|
||||
PRINTF("created stream for %s\n", spec);
|
||||
nsCRT::free(spec);
|
||||
#endif
|
||||
|
||||
@@ -1102,8 +1107,8 @@ nsresult nsPluginStreamListenerPeer::InitializeEmbeded(nsIURI *aURL,
|
||||
nsresult nsPluginStreamListenerPeer::InitializeFullPage(nsIPluginInstance *aInstance)
|
||||
{
|
||||
#ifdef NS_DEBUG
|
||||
printf("created stream for (unknown URL)\n");
|
||||
printf("Inside nsPluginStreamListenerPeer::InitializeFullPage...\n");
|
||||
PRINTF("created stream for (unknown URL)\n");
|
||||
PRINTF("Inside nsPluginStreamListenerPeer::InitializeFullPage...\n");
|
||||
#endif
|
||||
|
||||
NS_ASSERTION(mInstance == nsnull, "nsPluginStreamListenerPeer::InitializeFullPage mInstance != nsnull");
|
||||
@@ -1474,7 +1479,7 @@ nsPluginHostImpl::nsPluginHostImpl()
|
||||
nsPluginHostImpl::~nsPluginHostImpl()
|
||||
{
|
||||
#ifdef NS_DEBUG
|
||||
printf("killing plugin host\n");
|
||||
PRINTF("killing plugin host\n");
|
||||
#endif
|
||||
Destroy();
|
||||
if (nsnull != mPluginPath)
|
||||
@@ -2074,13 +2079,13 @@ NS_IMETHODIMP nsPluginHostImpl::InstantiateEmbededPlugin(const char *aMimeType,
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
if(aMimeType)
|
||||
printf("InstantiateEmbededPlugin for %s\n",aMimeType);
|
||||
PRINTF("InstantiateEmbededPlugin for %s\n",aMimeType);
|
||||
#endif
|
||||
|
||||
if(FindStoppedPluginForURL(aURL, aOwner) == NS_OK)
|
||||
{
|
||||
#ifdef NS_DEBUG
|
||||
printf("InstantiateEmbededPlugin find stopped\n");
|
||||
PRINTF("InstantiateEmbededPlugin find stopped\n");
|
||||
#endif
|
||||
|
||||
aOwner->GetInstance(instance);
|
||||
@@ -2185,7 +2190,7 @@ NS_IMETHODIMP nsPluginHostImpl::InstantiateEmbededPlugin(const char *aMimeType,
|
||||
}
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
printf("InstantiateEmbededPlugin.. returning\n");
|
||||
PRINTF("InstantiateEmbededPlugin.. returning\n");
|
||||
#endif
|
||||
return rv;
|
||||
}
|
||||
@@ -2202,7 +2207,7 @@ NS_IMETHODIMP nsPluginHostImpl::InstantiateFullPagePlugin(const char *aMimeType,
|
||||
PRBool isJavaEnabled = PR_TRUE;
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
printf("InstantiateFullPagePlugin for %s\n",aMimeType);
|
||||
PRINTF("InstantiateFullPagePlugin for %s\n",aMimeType);
|
||||
#endif
|
||||
|
||||
//create a URL so that the instantiator can do file ext.
|
||||
@@ -2215,7 +2220,7 @@ NS_IMETHODIMP nsPluginHostImpl::InstantiateFullPagePlugin(const char *aMimeType,
|
||||
if(FindStoppedPluginForURL(url, aOwner) == NS_OK)
|
||||
{
|
||||
#ifdef NS_DEBUG
|
||||
printf("InstantiateFullPagePlugin, got a stopped plugin\n");
|
||||
PRINTF("InstantiateFullPagePlugin, got a stopped plugin\n");
|
||||
#endif
|
||||
|
||||
nsIPluginInstance* instance;
|
||||
@@ -2236,7 +2241,7 @@ NS_IMETHODIMP nsPluginHostImpl::InstantiateFullPagePlugin(const char *aMimeType,
|
||||
nsPluginWindow *window = nsnull;
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
printf("InstantiateFullPagePlugin, got it... now stream\n");
|
||||
PRINTF("InstantiateFullPagePlugin, got it... now stream\n");
|
||||
#endif
|
||||
//we got a plugin built, now stream
|
||||
|
||||
@@ -2259,7 +2264,7 @@ NS_IMETHODIMP nsPluginHostImpl::InstantiateFullPagePlugin(const char *aMimeType,
|
||||
}
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
printf("Falling out of InstantiateFullPagePlugin...\n");
|
||||
PRINTF("Falling out of InstantiateFullPagePlugin...\n");
|
||||
#endif
|
||||
return rv;
|
||||
}
|
||||
@@ -2272,7 +2277,7 @@ nsresult nsPluginHostImpl::FindStoppedPluginForURL(nsIURI* aURL,
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
printf("Inside nsPluginHostImpl::FindStoppedPluginForURL...\n");
|
||||
PRINTF("Inside nsPluginHostImpl::FindStoppedPluginForURL...\n");
|
||||
#endif
|
||||
|
||||
(void)aURL->GetSpec(&url);
|
||||
@@ -2844,7 +2849,7 @@ NS_IMETHODIMP nsPluginHostImpl::GetPluginFactory(const char *aMimeType, nsIPlugi
|
||||
#ifdef XP_WIN // actually load a dll on Windows
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
printf("For %s found plugin %s\n", aMimeType, pluginTag->mFileName);
|
||||
PRINTF("For %s found plugin %s\n", aMimeType, pluginTag->mFileName);
|
||||
#endif
|
||||
|
||||
nsFileSpec file(pluginTag->mFileName);
|
||||
|
||||
Reference in New Issue
Block a user