Bug 1353143 - Part 2: Remove usage of PR_LOGGING. r=froydnj

Remove ifdefs that handle if logging is disabled, we always force enable it.
This commit is contained in:
Eric Rahm 2017-04-04 14:36:16 -07:00
Родитель 83eba01284
Коммит e373c06a30
7 изменённых файлов: 3 добавлений и 59 удалений

Просмотреть файл

@ -14,16 +14,11 @@
#include "prenv.h"
#include "mozilla/SizePrintfMacros.h"
#ifdef PR_LOGGING
extern mozilla::LazyLogModule gMediaDemuxerLog;
#define ADTSLOG(msg, ...) \
MOZ_LOG(gMediaDemuxerLog, LogLevel::Debug, ("ADTSDemuxer " msg, ##__VA_ARGS__))
#define ADTSLOGV(msg, ...) \
MOZ_LOG(gMediaDemuxerLog, LogLevel::Verbose, ("ADTSDemuxer " msg, ##__VA_ARGS__))
#else
#define ADTSLOG(msg, ...) do {} while (false)
#define ADTSLOGV(msg, ...) do {} while (false)
#endif
namespace mozilla {
namespace adts {

Просмотреть файл

@ -17,16 +17,11 @@
#include "TimeUnits.h"
#include "prenv.h"
#ifdef PR_LOGGING
extern mozilla::LazyLogModule gMediaDemuxerLog;
#define MP3LOG(msg, ...) \
MOZ_LOG(gMediaDemuxerLog, LogLevel::Debug, ("MP3Demuxer " msg, ##__VA_ARGS__))
#define MP3LOGV(msg, ...) \
MOZ_LOG(gMediaDemuxerLog, LogLevel::Verbose, ("MP3Demuxer " msg, ##__VA_ARGS__))
#else
#define MP3LOG(msg, ...)
#define MP3LOGV(msg, ...)
#endif
using mozilla::media::TimeUnit;
using mozilla::media::TimeInterval;

Просмотреть файл

@ -128,9 +128,7 @@ public:
StaticRefPtr<MediaMemoryTracker> MediaMemoryTracker::sUniqueInstance;
#if defined(PR_LOGGING)
LazyLogModule gMediaTimerLog("MediaTimer");
#endif
void
MediaDecoder::InitStatics()

Просмотреть файл

@ -15,16 +15,11 @@
#include "VideoUtils.h"
#include "TimeUnits.h"
#ifdef PR_LOGGING
extern mozilla::LazyLogModule gMediaDemuxerLog;
#define LOG(msg, ...) \
MOZ_LOG(gMediaDemuxerLog, LogLevel::Debug, ("FlacDemuxer " msg, ##__VA_ARGS__))
#define LOGV(msg, ...) \
MOZ_LOG(gMediaDemuxerLog, LogLevel::Verbose, ("FlacDemuxer " msg, ##__VA_ARGS__))
#else
#define LOG(msg, ...) do {} while (false)
#define LOGV(msg, ...) do {} while (false)
#endif
using namespace mozilla::media;

Просмотреть файл

@ -151,11 +151,9 @@ static const char kDirectoryServiceContractID[] = "@mozilla.org/file/directory_s
#define kPluginRegistryFilename NS_LITERAL_CSTRING("pluginreg.dat")
#ifdef PLUGIN_LOGGING
LazyLogModule nsPluginLogging::gNPNLog(NPN_LOG_NAME);
LazyLogModule nsPluginLogging::gNPPLog(NPP_LOG_NAME);
LazyLogModule nsPluginLogging::gPluginLog(PLUGIN_LOG_NAME);
#endif
// #defines for plugin cache and prefs
#define NS_PREF_MAX_NUM_CACHED_INSTANCES "browser.plugins.max_num_cached_plugins"

Просмотреть файл

@ -10,10 +10,6 @@
#include "mozilla/Logging.h"
#ifndef PLUGIN_LOGGING // allow external override
#define PLUGIN_LOGGING 1 // master compile-time switch for pluging logging
#endif
////////////////////////////////////////////////////////////////////////////////
// Basic Plugin Logging Usage Instructions
//
@ -43,8 +39,6 @@
// https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Gecko_Logging
#ifdef PLUGIN_LOGGING
class nsPluginLogging
{
public:
@ -53,38 +47,10 @@ public:
static mozilla::LazyLogModule gPluginLog; // general plugin log
};
#endif // PLUGIN_LOGGING
// Quick-use macros
#ifdef PLUGIN_LOGGING
#define NPN_PLUGIN_LOG(a, b) \
PR_BEGIN_MACRO \
MOZ_LOG(nsPluginLogging::gNPNLog, a, b); \
PR_LogFlush(); \
PR_END_MACRO
#else
#define NPN_PLUGIN_LOG(a, b)
#endif
#ifdef PLUGIN_LOGGING
#define NPP_PLUGIN_LOG(a, b) \
PR_BEGIN_MACRO \
MOZ_LOG(nsPluginLogging::gNPPLog, a, b); \
PR_LogFlush(); \
PR_END_MACRO
#else
#define NPP_PLUGIN_LOG(a, b)
#endif
#ifdef PLUGIN_LOGGING
#define PLUGIN_LOG(a, b) \
PR_BEGIN_MACRO \
MOZ_LOG(nsPluginLogging::gPluginLog, a, b); \
PR_LogFlush(); \
PR_END_MACRO
#else
#define PLUGIN_LOG(a, b)
#endif
#define NPN_PLUGIN_LOG(a, b) MOZ_LOG(nsPluginLogging::gNPNLog, a, b)
#define NPP_PLUGIN_LOG(a, b) MOZ_LOG(nsPluginLogging::gNPPLog, a, b)
#define PLUGIN_LOG(a, b) MOZ_LOG(nsPluginLogging::gPluginLog, a, b)
#endif // nsPluginLogging_h__

Просмотреть файл

@ -63,9 +63,6 @@
#include "nsAccessibilityService.h"
#endif
#ifdef MOZ_LOGGING
#define FORCE_PR_LOG 1 /* Allow logging in the release build */
#endif /* MOZ_LOGGING */
#include "mozilla/Logging.h"
#ifdef XP_MACOSX