mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1164620 - Part 1: Remove instances of #ifdef PR_LOGGING in various places. r=froydnj
PR_LOGGING is now always defined, we can remove #ifdefs checking for it.
This commit is contained in:
parent
5b7fe8084b
commit
37808e571f
@ -14,7 +14,6 @@ enum pType {
|
||||
|
||||
#include "prlog.h"
|
||||
|
||||
#if defined( PR_LOGGING )
|
||||
//
|
||||
// in order to do logging, the following environment variables need to be set:
|
||||
//
|
||||
@ -24,8 +23,5 @@ enum pType {
|
||||
extern PRLogModuleInfo* gNegotiateLog;
|
||||
|
||||
#define LOG(args) PR_LOG(gNegotiateLog, PR_LOG_DEBUG, args)
|
||||
#else
|
||||
#define LOG(args)
|
||||
#endif
|
||||
|
||||
#endif /* !defined( nsAuth_h__ ) */
|
||||
|
@ -220,7 +220,6 @@ static const mozilla::Module::ContractIDEntry kAuthContracts[] = {
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
#if defined( PR_LOGGING )
|
||||
PRLogModuleInfo *gNegotiateLog;
|
||||
|
||||
// setup nspr logging ...
|
||||
@ -230,9 +229,6 @@ InitNegotiateAuth()
|
||||
gNegotiateLog = PR_NewLogModule("negotiateauth");
|
||||
return NS_OK;
|
||||
}
|
||||
#else
|
||||
#define InitNegotiateAuth nullptr
|
||||
#endif
|
||||
|
||||
static void
|
||||
DestroyNegotiateAuth()
|
||||
|
@ -227,8 +227,6 @@ gssInit()
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#if defined( PR_LOGGING )
|
||||
|
||||
// Generate proper GSSAPI error messages from the major and
|
||||
// minor status codes.
|
||||
void
|
||||
@ -270,12 +268,6 @@ LogGssError(OM_uint32 maj_stat, OM_uint32 min_stat, const char *prefix)
|
||||
LOG(("%s\n", errorStr.get()));
|
||||
}
|
||||
|
||||
#else /* PR_LOGGING */
|
||||
|
||||
#define LogGssError(x,y,z)
|
||||
|
||||
#endif /* PR_LOGGING */
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
nsAuthGSSAPI::nsAuthGSSAPI(pType package)
|
||||
|
@ -478,12 +478,11 @@ nsAuthSSPI::GetNextToken(const void *inToken,
|
||||
&ignored);
|
||||
if (rc == SEC_I_CONTINUE_NEEDED || rc == SEC_E_OK) {
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
if (rc == SEC_E_OK)
|
||||
LOG(("InitializeSecurityContext: succeeded.\n"));
|
||||
else
|
||||
LOG(("InitializeSecurityContext: continue.\n"));
|
||||
#endif
|
||||
|
||||
if (sspi_cbt)
|
||||
free(sspi_cbt);
|
||||
|
||||
|
@ -28,12 +28,8 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// NSPR_LOG_MODULES=gio:5
|
||||
#ifdef PR_LOGGING
|
||||
static PRLogModuleInfo *sGIOLog;
|
||||
#define LOG(args) PR_LOG(sGIOLog, PR_LOG_DEBUG, args)
|
||||
#else
|
||||
#define LOG(args)
|
||||
#endif
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -906,9 +902,7 @@ NS_IMPL_ISUPPORTS(nsGIOProtocolHandler, nsIProtocolHandler, nsIObserver)
|
||||
nsresult
|
||||
nsGIOProtocolHandler::Init()
|
||||
{
|
||||
#ifdef PR_LOGGING
|
||||
sGIOLog = PR_NewLogModule("gio");
|
||||
#endif
|
||||
|
||||
nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID);
|
||||
if (prefs)
|
||||
|
@ -36,8 +36,6 @@ using namespace mozilla::unicode;
|
||||
|
||||
#define PRINTING_FC_PROPERTY "gfx.printing"
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
|
||||
#define LOG_FONTLIST(args) PR_LOG(gfxPlatform::GetLog(eGfxLog_fontlist), \
|
||||
PR_LOG_DEBUG, args)
|
||||
#define LOG_FONTLIST_ENABLED() PR_LOG_TEST( \
|
||||
@ -47,8 +45,6 @@ using namespace mozilla::unicode;
|
||||
gfxPlatform::GetLog(eGfxLog_cmapdata), \
|
||||
PR_LOG_DEBUG)
|
||||
|
||||
#endif
|
||||
|
||||
static const FcChar8*
|
||||
ToFcChar8Ptr(const char* aStr)
|
||||
{
|
||||
@ -387,7 +383,6 @@ gfxFontconfigFontEntry::ReadCMAP(FontInfoData *aFontInfoData)
|
||||
mCharacterMap = new gfxCharacterMap();
|
||||
}
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
LOG_FONTLIST(("(fontlist-cmap) name: %s, size: %d hash: %8.8x%s\n",
|
||||
NS_ConvertUTF16toUTF8(mName).get(),
|
||||
charmap->SizeOfIncludingThis(moz_malloc_size_of),
|
||||
@ -398,7 +393,6 @@ gfxFontconfigFontEntry::ReadCMAP(FontInfoData *aFontInfoData)
|
||||
NS_ConvertUTF16toUTF8(mName).get());
|
||||
charmap->Dump(prefix, eGfxLog_cmapdata);
|
||||
}
|
||||
#endif
|
||||
|
||||
return rv;
|
||||
}
|
||||
@ -850,7 +844,6 @@ gfxFontconfigFontFamily::FindStyleVariations(FontInfoData *aFontInfoData)
|
||||
fp->AddFullname(fontEntry, fullname);
|
||||
}
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
if (LOG_FONTLIST_ENABLED()) {
|
||||
LOG_FONTLIST(("(fontlist) added (%s) to family (%s)"
|
||||
" with style: %s weight: %d stretch: %d"
|
||||
@ -862,7 +855,6 @@ gfxFontconfigFontFamily::FindStyleVariations(FontInfoData *aFontInfoData)
|
||||
NS_ConvertUTF16toUTF8(psname).get(),
|
||||
NS_ConvertUTF16toUTF8(fullname).get()));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
mFaceNamesInitialized = true;
|
||||
mFontPatterns.Clear();
|
||||
|
@ -527,12 +527,10 @@ GDIFontFamily::FindStyleVariations(FontInfoData *aFontInfoData)
|
||||
EnumFontFamiliesExW(hdc, &logFont,
|
||||
(FONTENUMPROCW)GDIFontFamily::FamilyAddStylesProc,
|
||||
(LPARAM)this, 0);
|
||||
#ifdef PR_LOGGING
|
||||
if (LOG_FONTLIST_ENABLED() && mAvailableFonts.Length() == 0) {
|
||||
LOG_FONTLIST(("(fontlist) no styles available in family \"%s\"",
|
||||
NS_ConvertUTF16toUTF8(mName).get()));
|
||||
}
|
||||
#endif
|
||||
|
||||
ReleaseDC(nullptr, hdc);
|
||||
|
||||
|
@ -69,10 +69,8 @@ static const char kJSCachePrefix[] = "jsloader";
|
||||
#define XPC_SERIALIZATION_BUFFER_SIZE (64 * 1024)
|
||||
#define XPC_DESERIALIZATION_BUFFER_SIZE (12 * 8192)
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
// NSPR_LOG_MODULES=JSComponentLoader:5
|
||||
static PRLogModuleInfo* gJSCLLog;
|
||||
#endif
|
||||
|
||||
#define LOG(args) PR_LOG(gJSCLLog, PR_LOG_DEBUG, args)
|
||||
|
||||
@ -199,11 +197,9 @@ mozJSComponentLoader::mozJSComponentLoader()
|
||||
{
|
||||
MOZ_ASSERT(!sSelf, "mozJSComponentLoader should be a singleton");
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
if (!gJSCLLog) {
|
||||
gJSCLLog = PR_NewLogModule("JSComponentLoader");
|
||||
}
|
||||
#endif
|
||||
|
||||
sSelf = this;
|
||||
}
|
||||
|
@ -216,9 +216,7 @@ xpc::ErrorReport::Init(JSErrorReport* aReport, const char* aFallbackMessage,
|
||||
mIsMuted = aReport->isMuted;
|
||||
}
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
static PRLogModuleInfo* gJSDiagnostics;
|
||||
#endif
|
||||
|
||||
void
|
||||
xpc::ErrorReport::LogToConsole()
|
||||
@ -243,7 +241,6 @@ xpc::ErrorReport::LogToConsole()
|
||||
fflush(stderr);
|
||||
}
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
// Log to the PR Log Module.
|
||||
if (!gJSDiagnostics)
|
||||
gJSDiagnostics = PR_NewLogModule("JSDiagnostics");
|
||||
@ -253,7 +250,6 @@ xpc::ErrorReport::LogToConsole()
|
||||
("file %s, line %u\n%s", NS_LossyConvertUTF16toASCII(mFileName).get(),
|
||||
mLineNumber, NS_LossyConvertUTF16toASCII(mErrorMsg).get()));
|
||||
}
|
||||
#endif
|
||||
|
||||
// Log to the console. We do this last so that we can simply return if
|
||||
// there's no console service without affecting the other reporting
|
||||
|
@ -20,8 +20,6 @@
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
|
||||
#undef AC_LOG
|
||||
#define AC_LOG(message, ...) \
|
||||
AC_LOG_BASE("AccessibleCaretEventHub (%p): " message, this, ##__VA_ARGS__);
|
||||
@ -30,8 +28,6 @@ namespace mozilla {
|
||||
#define AC_LOGV(message, ...) \
|
||||
AC_LOGV_BASE("AccessibleCaretEventHub (%p): " message, this, ##__VA_ARGS__);
|
||||
|
||||
#endif // #ifdef PR_LOGGING
|
||||
|
||||
NS_IMPL_ISUPPORTS(AccessibleCaretEventHub, nsIReflowObserver, nsIScrollObserver,
|
||||
nsISelectionListener, nsISupportsWeakReference);
|
||||
|
||||
|
@ -21,8 +21,6 @@
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
|
||||
#undef AC_LOG
|
||||
#define AC_LOG(message, ...) \
|
||||
AC_LOG_BASE("AccessibleCaretManager (%p): " message, this, ##__VA_ARGS__);
|
||||
@ -31,8 +29,6 @@ namespace mozilla {
|
||||
#define AC_LOGV(message, ...) \
|
||||
AC_LOGV_BASE("AccessibleCaretManager (%p): " message, this, ##__VA_ARGS__);
|
||||
|
||||
#endif // #ifdef PR_LOGGING
|
||||
|
||||
using namespace dom;
|
||||
using Appearance = AccessibleCaret::Appearance;
|
||||
using PositionChangedResult = AccessibleCaret::PositionChangedResult;
|
||||
|
@ -43,14 +43,11 @@ static NS_DEFINE_CID(kZipReaderCID, NS_ZIPREADER_CID);
|
||||
#undef LOG
|
||||
#endif
|
||||
|
||||
#if defined(PR_LOGGING)
|
||||
//
|
||||
// set NSPR_LOG_MODULES=nsJarProtocol:5
|
||||
//
|
||||
static PRLogModuleInfo *gJarProtocolLog = nullptr;
|
||||
#endif
|
||||
|
||||
// If you ever want to define PR_FORCE_LOGGING in this file, see bug 545995
|
||||
#define LOG(args) PR_LOG(gJarProtocolLog, PR_LOG_DEBUG, args)
|
||||
#define LOG_ENABLED() PR_LOG_TEST(gJarProtocolLog, 4)
|
||||
|
||||
@ -203,10 +200,8 @@ nsJARChannel::nsJARChannel()
|
||||
, mOpeningRemote(false)
|
||||
, mEnsureChildFd(false)
|
||||
{
|
||||
#if defined(PR_LOGGING)
|
||||
if (!gJarProtocolLog)
|
||||
gJarProtocolLog = PR_NewLogModule("nsJarProtocol");
|
||||
#endif
|
||||
|
||||
// hold an owning reference to the jar handler
|
||||
NS_ADDREF(gJarHandler);
|
||||
@ -263,9 +258,7 @@ nsJARChannel::Init(nsIURI *uri)
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
#if defined(PR_LOGGING)
|
||||
mJarURI->GetSpec(mSpec);
|
||||
#endif
|
||||
return rv;
|
||||
}
|
||||
|
||||
@ -1182,9 +1175,7 @@ nsJARChannel::OnDataAvailable(nsIRequest *req, nsISupports *ctx,
|
||||
nsIInputStream *stream,
|
||||
uint64_t offset, uint32_t count)
|
||||
{
|
||||
#if defined(PR_LOGGING)
|
||||
LOG(("nsJARChannel::OnDataAvailable [this=%x %s]\n", this, mSpec.get()));
|
||||
#endif
|
||||
|
||||
nsresult rv;
|
||||
|
||||
|
@ -69,9 +69,7 @@ private:
|
||||
mozilla::net::MemoryDownloader::Data aData)
|
||||
override;
|
||||
|
||||
#if defined(PR_LOGGING)
|
||||
nsCString mSpec;
|
||||
#endif
|
||||
|
||||
bool mOpened;
|
||||
|
||||
|
@ -33,7 +33,6 @@
|
||||
|
||||
static const char16_t kUTF16[] = { 'U', 'T', 'F', '-', '1', '6', '\0' };
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
static PRLogModuleInfo *
|
||||
GetExpatDriverLog()
|
||||
{
|
||||
@ -42,7 +41,6 @@ GetExpatDriverLog()
|
||||
sLog = PR_NewLogModule("expatdriver");
|
||||
return sLog;
|
||||
}
|
||||
#endif
|
||||
|
||||
/***************************** EXPAT CALL BACKS ******************************/
|
||||
// The callback handlers that get called from the expat parser.
|
||||
@ -1080,7 +1078,6 @@ nsExpatDriver::ConsumeToken(nsScanner& aScanner, bool& aFlushTokens)
|
||||
buffer = nullptr;
|
||||
length = 0;
|
||||
|
||||
#if defined(PR_LOGGING) || defined (DEBUG)
|
||||
if (blocked) {
|
||||
PR_LOG(GetExpatDriverLog(), PR_LOG_DEBUG,
|
||||
("Resuming Expat, will parse data remaining in Expat's "
|
||||
@ -1097,7 +1094,6 @@ nsExpatDriver::ConsumeToken(nsScanner& aScanner, bool& aFlushTokens)
|
||||
NS_ConvertUTF16toUTF8(currentExpatPosition.get(),
|
||||
mExpatBuffered).get()));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
buffer = start.get();
|
||||
|
Loading…
Reference in New Issue
Block a user