mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1194631 - Make firefox build with --disable-logging. r=jrmuizel
This commit is contained in:
parent
529ec49c52
commit
6240d5a00a
@ -112,20 +112,24 @@ public:
|
||||
|
||||
StaticRefPtr<MediaMemoryTracker> MediaMemoryTracker::sUniqueInstance;
|
||||
|
||||
#if defined(PR_LOGGING)
|
||||
PRLogModuleInfo* gStateWatchingLog;
|
||||
PRLogModuleInfo* gMozPromiseLog;
|
||||
PRLogModuleInfo* gMediaTimerLog;
|
||||
PRLogModuleInfo* gMediaSampleLog;
|
||||
#endif
|
||||
|
||||
void
|
||||
MediaDecoder::InitStatics()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
#if defined(PR_LOGGING)
|
||||
// Log modules.
|
||||
gMediaDecoderLog = PR_NewLogModule("MediaDecoder");
|
||||
gMediaTimerLog = PR_NewLogModule("MediaTimer");
|
||||
gMediaSampleLog = PR_NewLogModule("MediaSample");
|
||||
#endif
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS(MediaMemoryTracker, nsIMemoryReporter)
|
||||
|
@ -52,6 +52,7 @@
|
||||
|
||||
#include "mozilla/CheckedInt.h"
|
||||
|
||||
#if defined(PR_LOGGING)
|
||||
GFX2D_API PRLogModuleInfo *
|
||||
GetGFX2DLog()
|
||||
{
|
||||
@ -60,6 +61,7 @@ GetGFX2DLog()
|
||||
sLog = PR_NewLogModule("gfx2d");
|
||||
return sLog;
|
||||
}
|
||||
#endif
|
||||
|
||||
// The following code was largely taken from xpcom/glue/SSE.cpp and
|
||||
// made a little simpler.
|
||||
|
@ -22,7 +22,9 @@
|
||||
#include "BaseRect.h"
|
||||
#include "Matrix.h"
|
||||
|
||||
#if defined(MOZ_LOGGING)
|
||||
extern GFX2D_API PRLogModuleInfo *GetGFX2DLog();
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
namespace gfx {
|
||||
@ -42,6 +44,7 @@ const int LOG_DEFAULT = LOG_EVERYTHING;
|
||||
const int LOG_DEFAULT = LOG_CRITICAL;
|
||||
#endif
|
||||
|
||||
#if defined(MOZ_LOGGING)
|
||||
inline mozilla::LogLevel PRLogLevelForLevel(int aLevel) {
|
||||
switch (aLevel) {
|
||||
case LOG_CRITICAL:
|
||||
@ -57,6 +60,7 @@ inline mozilla::LogLevel PRLogLevelForLevel(int aLevel) {
|
||||
}
|
||||
return LogLevel::Debug;
|
||||
}
|
||||
#endif
|
||||
|
||||
class PreferenceAccess
|
||||
{
|
||||
@ -133,9 +137,12 @@ struct BasicLogger
|
||||
#if defined(MOZ_WIDGET_GONK) || defined(MOZ_WIDGET_ANDROID)
|
||||
return true;
|
||||
#else
|
||||
#if defined(MOZ_LOGGING)
|
||||
if (MOZ_LOG_TEST(GetGFX2DLog(), PRLogLevelForLevel(aLevel))) {
|
||||
return true;
|
||||
} else if ((PreferenceAccess::sGfxLogLevel >= LOG_DEBUG_PRLOG) ||
|
||||
} else
|
||||
#endif
|
||||
if ((PreferenceAccess::sGfxLogLevel >= LOG_DEBUG_PRLOG) ||
|
||||
(aLevel < LOG_DEBUG)) {
|
||||
return true;
|
||||
}
|
||||
@ -160,9 +167,12 @@ struct BasicLogger
|
||||
#if defined(MOZ_WIDGET_GONK) || defined(MOZ_WIDGET_ANDROID)
|
||||
printf_stderr("%s%s", aString.c_str(), aNoNewline ? "" : "\n");
|
||||
#else
|
||||
#if defined(MOZ_LOGGING)
|
||||
if (MOZ_LOG_TEST(GetGFX2DLog(), PRLogLevelForLevel(aLevel))) {
|
||||
PR_LogPrint("%s%s", aString.c_str(), aNoNewline ? "" : "\n");
|
||||
} else if ((PreferenceAccess::sGfxLogLevel >= LOG_DEBUG_PRLOG) ||
|
||||
} else
|
||||
#endif
|
||||
if ((PreferenceAccess::sGfxLogLevel >= LOG_DEBUG_PRLOG) ||
|
||||
(aLevel < LOG_DEBUG)) {
|
||||
printf("%s%s", aString.c_str(), aNoNewline ? "" : "\n");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user