Bug 1165515 - Part 3: Convert PR_LOG_TEST to MOZ_LOG_TEST. r=froydnj

This commit is contained in:
Eric Rahm 2015-06-01 14:31:00 -07:00
parent 77e9c555b4
commit a50b98baa8
114 changed files with 235 additions and 235 deletions

View File

@ -1418,7 +1418,7 @@ nsDocShell::LoadURI(nsIURI* aURI,
}
#if defined(DEBUG)
if (PR_LOG_TEST(gDocShellLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gDocShellLog, PR_LOG_DEBUG)) {
nsAutoCString uristr;
aURI->GetAsciiSpec(uristr);
MOZ_LOG(gDocShellLog, PR_LOG_DEBUG,
@ -1980,7 +1980,7 @@ bool
nsDocShell::SetCurrentURI(nsIURI* aURI, nsIRequest* aRequest,
bool aFireOnLocationChange, uint32_t aLocationFlags)
{
if (gDocShellLeakLog && PR_LOG_TEST(gDocShellLeakLog, PR_LOG_DEBUG)) {
if (gDocShellLeakLog && MOZ_LOG_TEST(gDocShellLeakLog, PR_LOG_DEBUG)) {
nsAutoCString spec;
if (aURI) {
aURI->GetSpec(spec);
@ -5302,7 +5302,7 @@ nsDocShell::LoadErrorPage(nsIURI* aURI, const char16_t* aURL,
nsIChannel* aFailedChannel)
{
#if defined(DEBUG)
if (PR_LOG_TEST(gDocShellLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gDocShellLog, PR_LOG_DEBUG)) {
nsAutoCString spec;
aURI->GetSpec(spec);
@ -9606,7 +9606,7 @@ nsDocShell::InternalLoad(nsIURI* aURI,
nsresult rv = NS_OK;
mOriginalUriString.Truncate();
if (gDocShellLeakLog && PR_LOG_TEST(gDocShellLeakLog, PR_LOG_DEBUG)) {
if (gDocShellLeakLog && MOZ_LOG_TEST(gDocShellLeakLog, PR_LOG_DEBUG)) {
nsAutoCString spec;
if (aURI) {
aURI->GetSpec(spec);
@ -11165,7 +11165,7 @@ nsDocShell::OnNewURI(nsIURI* aURI, nsIChannel* aChannel, nsISupports* aOwner,
NS_PRECONDITION(!aChannel || !aOwner, "Shouldn't have both set");
#if defined(DEBUG)
if (PR_LOG_TEST(gDocShellLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gDocShellLog, PR_LOG_DEBUG)) {
nsAutoCString spec;
aURI->GetSpec(spec);
@ -11785,7 +11785,7 @@ nsDocShell::AddToSessionHistory(nsIURI* aURI, nsIChannel* aChannel,
NS_PRECONDITION(!aChannel || !aOwner, "Shouldn't have both set");
#if defined(DEBUG)
if (PR_LOG_TEST(gDocShellLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gDocShellLog, PR_LOG_DEBUG)) {
nsAutoCString spec;
aURI->GetSpec(spec);

View File

@ -78,7 +78,7 @@ GetSHistoryLog()
//
#define LOG_SPEC(format, uri) \
PR_BEGIN_MACRO \
if (PR_LOG_TEST(GetSHistoryLog(), PR_LOG_DEBUG)) { \
if (MOZ_LOG_TEST(GetSHistoryLog(), PR_LOG_DEBUG)) { \
nsAutoCString _specStr(NS_LITERAL_CSTRING("(null)"));\
if (uri) { \
uri->GetSpec(_specStr); \
@ -96,7 +96,7 @@ GetSHistoryLog()
//
#define LOG_SHENTRY_SPEC(format, shentry) \
PR_BEGIN_MACRO \
if (PR_LOG_TEST(GetSHistoryLog(), PR_LOG_DEBUG)) { \
if (MOZ_LOG_TEST(GetSHistoryLog(), PR_LOG_DEBUG)) { \
nsCOMPtr<nsIURI> uri; \
shentry->GetURI(getter_AddRefs(uri)); \
LOG_SPEC(format, uri); \

View File

@ -188,7 +188,7 @@ nsContentPolicy::CheckPolicy(CPMethod policyMethod,
#define LOG_CHECK(logType) \
PR_BEGIN_MACRO \
/* skip all this nonsense if the call failed or logging is disabled */ \
if (NS_SUCCEEDED(rv) && PR_LOG_TEST(gConPolLog, PR_LOG_DEBUG)) { \
if (NS_SUCCEEDED(rv) && MOZ_LOG_TEST(gConPolLog, PR_LOG_DEBUG)) { \
const char *resultName; \
if (decision) { \
resultName = NS_CP_ResponseName(*decision); \

View File

@ -2305,7 +2305,7 @@ nsDocument::ResetToURI(nsIURI *aURI, nsILoadGroup *aLoadGroup,
{
NS_PRECONDITION(aURI, "Null URI passed to ResetToURI");
if (gDocumentLeakPRLog && PR_LOG_TEST(gDocumentLeakPRLog, PR_LOG_DEBUG)) {
if (gDocumentLeakPRLog && MOZ_LOG_TEST(gDocumentLeakPRLog, PR_LOG_DEBUG)) {
nsAutoCString spec;
aURI->GetSpec(spec);
PR_LogPrint("DOCUMENT %p ResetToURI %s", this, spec.get());
@ -2638,7 +2638,7 @@ nsDocument::StartDocumentLoad(const char* aCommand, nsIChannel* aChannel,
nsIStreamListener **aDocListener,
bool aReset, nsIContentSink* aSink)
{
if (gDocumentLeakPRLog && PR_LOG_TEST(gDocumentLeakPRLog, PR_LOG_DEBUG)) {
if (gDocumentLeakPRLog && MOZ_LOG_TEST(gDocumentLeakPRLog, PR_LOG_DEBUG)) {
nsCOMPtr<nsIURI> uri;
aChannel->GetURI(getter_AddRefs(uri));
nsAutoCString spec;
@ -2866,7 +2866,7 @@ nsDocument::InitCSP(nsIChannel* aChannel)
!applyLoopCSP &&
cspHeaderValue.IsEmpty() &&
cspROHeaderValue.IsEmpty()) {
if (PR_LOG_TEST(gCspPRLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gCspPRLog, PR_LOG_DEBUG)) {
nsCOMPtr<nsIURI> chanURI;
aChannel->GetURI(getter_AddRefs(chanURI));
nsAutoCString aspec;

View File

@ -81,7 +81,7 @@ PRLogModuleInfo* gFocusNavigationLog;
#define LOGFOCUSNAVIGATION(args) MOZ_LOG(gFocusNavigationLog, PR_LOG_DEBUG, args)
#define LOGTAG(log, format, content) \
if (PR_LOG_TEST(log, PR_LOG_DEBUG)) { \
if (MOZ_LOG_TEST(log, PR_LOG_DEBUG)) { \
nsAutoCString tag(NS_LITERAL_CSTRING("(none)")); \
if (content) { \
content->NodeInfo()->NameAtom()->ToUTF8String(tag); \
@ -482,7 +482,7 @@ nsFocusManager::MoveFocus(nsIDOMWindow* aWindow, nsIDOMElement* aStartElement,
LOGFOCUS(("<<MoveFocus begin Type: %d Flags: %x>>", aType, aFlags));
if (PR_LOG_TEST(gFocusLog, PR_LOG_DEBUG) && mFocusedWindow) {
if (MOZ_LOG_TEST(gFocusLog, PR_LOG_DEBUG) && mFocusedWindow) {
nsIDocument* doc = mFocusedWindow->GetExtantDoc();
if (doc && doc->GetDocumentURI()) {
nsAutoCString spec;
@ -638,7 +638,7 @@ nsFocusManager::WindowRaised(nsIDOMWindow* aWindow)
nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(aWindow);
NS_ENSURE_TRUE(window && window->IsOuterWindow(), NS_ERROR_INVALID_ARG);
if (PR_LOG_TEST(gFocusLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gFocusLog, PR_LOG_DEBUG)) {
LOGFOCUS(("Window %p Raised [Currently: %p %p]", aWindow, mActiveWindow.get(), mFocusedWindow.get()));
nsAutoCString spec;
nsIDocument* doc = window->GetExtantDoc();
@ -734,7 +734,7 @@ nsFocusManager::WindowLowered(nsIDOMWindow* aWindow)
nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(aWindow);
NS_ENSURE_TRUE(window && window->IsOuterWindow(), NS_ERROR_INVALID_ARG);
if (PR_LOG_TEST(gFocusLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gFocusLog, PR_LOG_DEBUG)) {
LOGFOCUS(("Window %p Lowered [Currently: %p %p]", aWindow, mActiveWindow.get(), mFocusedWindow.get()));
nsAutoCString spec;
nsIDocument* doc = window->GetExtantDoc();
@ -852,7 +852,7 @@ nsFocusManager::WindowShown(nsIDOMWindow* aWindow, bool aNeedsFocus)
window = window->GetOuterWindow();
if (PR_LOG_TEST(gFocusLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gFocusLog, PR_LOG_DEBUG)) {
LOGFOCUS(("Window %p Shown [Currently: %p %p]", window.get(), mActiveWindow.get(), mFocusedWindow.get()));
nsAutoCString spec;
nsIDocument* doc = window->GetExtantDoc();
@ -907,7 +907,7 @@ nsFocusManager::WindowHidden(nsIDOMWindow* aWindow)
window = window->GetOuterWindow();
if (PR_LOG_TEST(gFocusLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gFocusLog, PR_LOG_DEBUG)) {
LOGFOCUS(("Window %p Hidden [Currently: %p %p]", window.get(), mActiveWindow.get(), mFocusedWindow.get()));
nsAutoCString spec;
nsIDocument* doc = window->GetExtantDoc();
@ -1777,7 +1777,7 @@ nsFocusManager::Focus(nsPIDOMWindow* aWindow,
LOGCONTENT("Element %s has been focused", aContent);
if (PR_LOG_TEST(gFocusLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gFocusLog, PR_LOG_DEBUG)) {
nsIDocument* docm = aWindow->GetExtantDoc();
if (docm) {
LOGCONTENT(" from %s", docm->GetRootElement());

View File

@ -2804,7 +2804,7 @@ nsGlobalWindow::InnerSetNewDocument(JSContext* aCx, nsIDocument* aDocument)
NS_PRECONDITION(IsInnerWindow(), "Must only be called on inner windows");
MOZ_ASSERT(aDocument);
if (gDOMLeakPRLog && PR_LOG_TEST(gDOMLeakPRLog, PR_LOG_DEBUG)) {
if (gDOMLeakPRLog && MOZ_LOG_TEST(gDOMLeakPRLog, PR_LOG_DEBUG)) {
nsIURI *uri = aDocument->GetDocumentURI();
nsAutoCString spec;
if (uri)
@ -10558,7 +10558,7 @@ nsGlobalWindow::GetSessionStorage(ErrorResult& aError)
}
if (mSessionStorage) {
if (PR_LOG_TEST(gDOMLeakPRLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gDOMLeakPRLog, PR_LOG_DEBUG)) {
PR_LogPrint("nsGlobalWindow %p has %p sessionStorage", this, mSessionStorage.get());
}
bool canAccess = mSessionStorage->CanAccess(principal);
@ -10609,7 +10609,7 @@ nsGlobalWindow::GetSessionStorage(ErrorResult& aError)
mSessionStorage = static_cast<DOMStorage*>(storage.get());
MOZ_ASSERT(mSessionStorage);
if (PR_LOG_TEST(gDOMLeakPRLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gDOMLeakPRLog, PR_LOG_DEBUG)) {
PR_LogPrint("nsGlobalWindow %p tried to get a new sessionStorage %p", this, mSessionStorage.get());
}
@ -10619,7 +10619,7 @@ nsGlobalWindow::GetSessionStorage(ErrorResult& aError)
}
}
if (PR_LOG_TEST(gDOMLeakPRLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gDOMLeakPRLog, PR_LOG_DEBUG)) {
PR_LogPrint("nsGlobalWindow %p returns %p sessionStorage", this, mSessionStorage.get());
}
@ -11537,7 +11537,7 @@ nsGlobalWindow::Observe(nsISupports* aSubject, const char* aTopic,
return NS_OK;
}
if (PR_LOG_TEST(gDOMLeakPRLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gDOMLeakPRLog, PR_LOG_DEBUG)) {
PR_LogPrint("nsGlobalWindow %p with sessionStorage %p passing event from %p",
this, mSessionStorage.get(), changingStorage.get());
}

View File

@ -117,7 +117,7 @@ GetObjectLog()
}
#define LOG(args) MOZ_LOG(GetObjectLog(), PR_LOG_DEBUG, args)
#define LOG_ENABLED() PR_LOG_TEST(GetObjectLog(), PR_LOG_DEBUG)
#define LOG_ENABLED() MOZ_LOG_TEST(GetObjectLog(), PR_LOG_DEBUG)
static bool
IsJavaMIME(const nsACString & aMIMEType)

View File

@ -506,7 +506,7 @@ IMEStateManager::OnMouseButtonEventInEditor(nsPresContext* aPresContext,
bool consumed =
sActiveIMEContentObserver->OnMouseButtonEvent(aPresContext, internalEvent);
if (PR_LOG_TEST(sISMLog, PR_LOG_ALWAYS)) {
if (MOZ_LOG_TEST(sISMLog, PR_LOG_ALWAYS)) {
nsAutoString eventType;
aMouseEvent->GetType(eventType);
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,

View File

@ -284,7 +284,7 @@ LoggingHelper(bool aUseProfiler, const char* aFmt, ...)
static const PRLogModuleLevel logLevel = PR_LOG_WARNING;
if (PR_LOG_TEST(logModule, logLevel) ||
if (MOZ_LOG_TEST(logModule, logLevel) ||
(aUseProfiler && profiler_is_active())) {
nsAutoCString message;

View File

@ -612,7 +612,7 @@ AudioStream::Write(const AudioDataValue* aBuf, uint32_t aFrames, TimeStamp *aTim
uint32_t bytesToCopy = FramesToBytes(aFrames);
// XXX this will need to change if we want to enable this on-the-fly!
if (PR_LOG_TEST(GetLatencyLog(), PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(GetLatencyLog(), PR_LOG_DEBUG)) {
// Record the position and time this data was inserted
int64_t timeMs;
if (aTime && !aTime->IsNull()) {
@ -1133,7 +1133,7 @@ AudioStream::DataCallback(void* aBuffer, long aFrames)
WriteDumpFile(mDumpFile, this, aFrames, aBuffer);
// Don't log if we're not interested or if the stream is inactive
if (PR_LOG_TEST(GetLatencyLog(), PR_LOG_DEBUG) &&
if (MOZ_LOG_TEST(GetLatencyLog(), PR_LOG_DEBUG) &&
mState != SHUTDOWN &&
insertTime != INT64_MAX && servicedFrames > underrunFrames) {
uint32_t latency = UINT32_MAX;

View File

@ -216,7 +216,7 @@ void AsyncLatencyLogger::Log(LatencyLogIndex aIndex, uint64_t aID, int64_t aValu
void AsyncLatencyLogger::Log(LatencyLogIndex aIndex, uint64_t aID, int64_t aValue, TimeStamp &aTime)
{
if (PR_LOG_TEST(GetLatencyLog(), PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(GetLatencyLog(), PR_LOG_DEBUG)) {
nsCOMPtr<nsIRunnable> event = new LogEvent(aIndex, aID, aValue, aTime);
if (mThread) {
mThread->Dispatch(event, NS_DISPATCH_NORMAL);

View File

@ -65,7 +65,7 @@ SampleSink::Receive(IMediaSample* aSample)
mon.Wait();
}
if (PR_LOG_TEST(GetDirectShowLog(), PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(GetDirectShowLog(), PR_LOG_DEBUG)) {
REFERENCE_TIME start = 0, end = 0;
HRESULT hr = aSample->GetMediaTime(&start, &end);
LOG("SampleSink::Receive() [%4.2lf-%4.2lf]",
@ -102,7 +102,7 @@ SampleSink::Extract(RefPtr<IMediaSample>& aOutSample)
}
aOutSample = mSample;
if (PR_LOG_TEST(GetDirectShowLog(), PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(GetDirectShowLog(), PR_LOG_DEBUG)) {
int64_t start = 0, end = 0;
mSample->GetMediaTime(&start, &end);
LOG("SampleSink::Extract() [%4.2lf-%4.2lf]",

View File

@ -15,7 +15,7 @@ namespace mozilla {
#ifndef EME_LOG
PRLogModuleInfo* GetEMELog();
#define EME_LOG(...) MOZ_LOG(GetEMELog(), PR_LOG_DEBUG, (__VA_ARGS__))
#define EME_LOG_ENABLED() PR_LOG_TEST(GetEMELog(), PR_LOG_DEBUG)
#define EME_LOG_ENABLED() MOZ_LOG_TEST(GetEMELog(), PR_LOG_DEBUG)
#endif
#ifndef EME_VERBOSE_LOG

View File

@ -22,7 +22,7 @@ PRLogModuleInfo *gLoadManagerLog = nullptr;
#undef LOG
#undef LOG_ENABLED
#define LOG(args) MOZ_LOG(gLoadManagerLog, PR_LOG_DEBUG, args)
#define LOG_ENABLED() PR_LOG_TEST(gLoadManagerLog, 5)
#define LOG_ENABLED() MOZ_LOG_TEST(gLoadManagerLog, 5)
namespace mozilla {

View File

@ -57,8 +57,8 @@
#undef LOG
#undef LOG_ENABLED
#define LOG(args) MOZ_LOG(gLoadManagerLog, PR_LOG_DEBUG, args)
#define LOG_ENABLED() PR_LOG_TEST(gLoadManagerLog, 4)
#define LOG_MANY_ENABLED() PR_LOG_TEST(gLoadManagerLog, 5)
#define LOG_ENABLED() MOZ_LOG_TEST(gLoadManagerLog, 4)
#define LOG_MANY_ENABLED() MOZ_LOG_TEST(gLoadManagerLog, 5)
namespace mozilla {

View File

@ -16,7 +16,7 @@
#undef LOG_ENABLED
PRLogModuleInfo *gOpenSLESProviderLog;
#define LOG(args) MOZ_LOG(gOpenSLESProviderLog, PR_LOG_DEBUG, args)
#define LOG_ENABLED() PR_LOG_TEST(gOpenSLESProviderLog, PR_LOG_DEBUG)
#define LOG_ENABLED() MOZ_LOG_TEST(gOpenSLESProviderLog, PR_LOG_DEBUG)
namespace mozilla {

View File

@ -104,7 +104,7 @@ static void webm_log(nestegg * context,
unsigned int severity,
char const * format, ...)
{
if (!PR_LOG_TEST(gNesteggLog, PR_LOG_DEBUG)) {
if (!MOZ_LOG_TEST(gNesteggLog, PR_LOG_DEBUG)) {
return;
}

View File

@ -218,7 +218,7 @@ MediaEngineCameraVideoSource::ChooseCapability(
const dom::MediaTrackConstraints &aConstraints,
const MediaEnginePrefs &aPrefs)
{
if (PR_LOG_TEST(GetMediaManagerLog(), PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(GetMediaManagerLog(), PR_LOG_DEBUG)) {
LOG(("ChooseCapability: prefs: %dx%d @%d-%dfps",
aPrefs.GetWidth(), aPrefs.GetHeight(),
aPrefs.mFPS, aPrefs.mMinFPS));

View File

@ -275,7 +275,7 @@ MediaEngineWebRTCAudioSource::Allocate(const dom::MediaTrackConstraints &aConstr
LOG(("Audio device is not initalized"));
return NS_ERROR_FAILURE;
}
} else if (PR_LOG_TEST(GetMediaManagerLog(), PR_LOG_DEBUG)) {
} else if (MOZ_LOG_TEST(GetMediaManagerLog(), PR_LOG_DEBUG)) {
MonitorAutoLock lock(mMonitor);
if (mSources.IsEmpty()) {
LOG(("Audio device %d reallocated", mCapIndex));

View File

@ -227,7 +227,7 @@ MediaEngineWebRTCVideoSource::Allocate(const dom::MediaTrackConstraints &aConstr
}
mState = kAllocated;
LOG(("Video device %d allocated", mCaptureIndex));
} else if (PR_LOG_TEST(GetMediaManagerLog(), PR_LOG_DEBUG)) {
} else if (MOZ_LOG_TEST(GetMediaManagerLog(), PR_LOG_DEBUG)) {
MonitorAutoLock lock(mMonitor);
if (mSources.IsEmpty()) {
LOG(("Video device %d reallocated", mCaptureIndex));

View File

@ -25,7 +25,7 @@ struct JSContext;
extern PRLogModuleInfo *gUDPSocketLog;
#endif
#define UDPSOCKET_LOG(args) PR_LOG(gUDPSocketLog, PR_LOG_DEBUG, args)
#define UDPSOCKET_LOG_ENABLED() PR_LOG_TEST(gUDPSocketLog, PR_LOG_DEBUG)
#define UDPSOCKET_LOG_ENABLED() MOZ_LOG_TEST(gUDPSocketLog, PR_LOG_DEBUG)
namespace mozilla {
namespace dom {

View File

@ -24,7 +24,7 @@ using mozilla::net::gNeckoChild;
extern PRLogModuleInfo *gUDPSocketLog;
#endif
#define UDPSOCKET_LOG(args) PR_LOG(gUDPSocketLog, PR_LOG_DEBUG, args)
#define UDPSOCKET_LOG_ENABLED() PR_LOG_TEST(gUDPSocketLog, PR_LOG_DEBUG)
#define UDPSOCKET_LOG_ENABLED() MOZ_LOG_TEST(gUDPSocketLog, PR_LOG_DEBUG)
namespace mozilla {
namespace dom {

View File

@ -29,7 +29,7 @@
extern PRLogModuleInfo *gUDPSocketLog;
#endif
#define UDPSOCKET_LOG(args) PR_LOG(gUDPSocketLog, PR_LOG_DEBUG, args)
#define UDPSOCKET_LOG_ENABLED() PR_LOG_TEST(gUDPSocketLog, PR_LOG_DEBUG)
#define UDPSOCKET_LOG_ENABLED() MOZ_LOG_TEST(gUDPSocketLog, PR_LOG_DEBUG)
namespace mozilla {
namespace dom {

View File

@ -53,7 +53,7 @@ GetCspContextLog()
}
#define CSPCONTEXTLOG(args) MOZ_LOG(GetCspContextLog(), PR_LOG_DEBUG, args)
#define CSPCONTEXTLOGENABLED() PR_LOG_TEST(GetCspContextLog(), PR_LOG_DEBUG)
#define CSPCONTEXTLOGENABLED() MOZ_LOG_TEST(GetCspContextLog(), PR_LOG_DEBUG)
static const uint32_t CSP_CACHE_URI_CUTOFF_SIZE = 512;

View File

@ -29,7 +29,7 @@ GetCspParserLog()
}
#define CSPPARSERLOG(args) MOZ_LOG(GetCspParserLog(), PR_LOG_DEBUG, args)
#define CSPPARSERLOGENABLED() PR_LOG_TEST(GetCspParserLog(), PR_LOG_DEBUG)
#define CSPPARSERLOGENABLED() MOZ_LOG_TEST(GetCspParserLog(), PR_LOG_DEBUG)
static const char16_t COLON = ':';
static const char16_t SEMICOLON = ';';

View File

@ -109,7 +109,7 @@ CSPService::ShouldLoad(uint32_t aContentType,
return NS_ERROR_FAILURE;
}
if (PR_LOG_TEST(gCspPRLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gCspPRLog, PR_LOG_DEBUG)) {
nsAutoCString location;
aContentLocation->GetSpec(location);
MOZ_LOG(gCspPRLog, PR_LOG_DEBUG,
@ -204,7 +204,7 @@ CSPService::ShouldLoad(uint32_t aContentType,
principal->GetCsp(getter_AddRefs(csp));
if (csp) {
if (PR_LOG_TEST(gCspPRLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gCspPRLog, PR_LOG_DEBUG)) {
uint32_t numPolicies = 0;
nsresult rv = csp->GetPolicyCount(&numPolicies);
if (NS_SUCCEEDED(rv)) {
@ -228,7 +228,7 @@ CSPService::ShouldLoad(uint32_t aContentType,
aDecision);
}
}
else if (PR_LOG_TEST(gCspPRLog, PR_LOG_DEBUG)) {
else if (MOZ_LOG_TEST(gCspPRLog, PR_LOG_DEBUG)) {
nsAutoCString uriSpec;
aContentLocation->GetSpec(uriSpec);
MOZ_LOG(gCspPRLog, PR_LOG_DEBUG,
@ -316,7 +316,7 @@ CSPService::AsyncOnChannelRedirect(nsIChannel *oldChannel,
originalUri, // aMimeTypeGuess
&aDecision);
if (newUri && PR_LOG_TEST(gCspPRLog, PR_LOG_DEBUG)) {
if (newUri && MOZ_LOG_TEST(gCspPRLog, PR_LOG_DEBUG)) {
nsAutoCString newUriSpec("None");
newUri->GetSpec(newUriSpec);
MOZ_LOG(gCspPRLog, PR_LOG_DEBUG,

View File

@ -24,7 +24,7 @@ GetCspUtilsLog()
}
#define CSPUTILSLOG(args) MOZ_LOG(GetCspUtilsLog(), PR_LOG_DEBUG, args)
#define CSPUTILSLOGENABLED() PR_LOG_TEST(GetCspUtilsLog(), PR_LOG_DEBUG)
#define CSPUTILSLOGENABLED() MOZ_LOG_TEST(GetCspUtilsLog(), PR_LOG_DEBUG)
void
CSP_GetLocalizedStr(const char16_t* aName,

View File

@ -157,7 +157,7 @@ txStylesheet::findTemplate(const txXPathNode& aNode,
}
}
if (PR_LOG_TEST(txLog::xslt, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(txLog::xslt, PR_LOG_DEBUG)) {
nsAutoString mode, nodeName;
if (aMode.mLocalName) {
aMode.mLocalName->ToString(mode);

View File

@ -375,7 +375,7 @@ XULDocument::StartDocumentLoad(const char* aCommand, nsIChannel* aChannel,
nsIStreamListener **aDocListener,
bool aReset, nsIContentSink* aSink)
{
if (PR_LOG_TEST(gXULLog, PR_LOG_WARNING)) {
if (MOZ_LOG_TEST(gXULLog, PR_LOG_WARNING)) {
nsCOMPtr<nsIURI> uri;
nsresult rv = aChannel->GetOriginalURI(getter_AddRefs(uri));
@ -559,7 +559,7 @@ XULDocument::EndLoad()
}
OnPrototypeLoadDone(true);
if (PR_LOG_TEST(gXULLog, PR_LOG_WARNING)) {
if (MOZ_LOG_TEST(gXULLog, PR_LOG_WARNING)) {
nsAutoCString urlspec;
rv = uri->GetSpec(urlspec);
if (NS_SUCCEEDED(rv)) {
@ -2271,7 +2271,7 @@ XULDocument::PrepareToWalk()
nsXULPrototypeElement* proto = mCurrentPrototype->GetRootElement();
if (! proto) {
if (PR_LOG_TEST(gXULLog, PR_LOG_ERROR)) {
if (MOZ_LOG_TEST(gXULLog, PR_LOG_ERROR)) {
nsCOMPtr<nsIURI> url = mCurrentPrototype->GetURI();
nsAutoCString urlspec;
@ -2542,7 +2542,7 @@ XULDocument::LoadOverlayInternal(nsIURI* aURI, bool aIsDynamic,
*aShouldReturn = false;
*aFailureFromContent = false;
if (PR_LOG_TEST(gXULLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gXULLog, PR_LOG_DEBUG)) {
nsAutoCString urlspec;
aURI->GetSpec(urlspec);
nsAutoCString parentDoc;
@ -3578,7 +3578,7 @@ XULDocument::CreateElementFromPrototype(nsXULPrototypeElement* aPrototype,
*aResult = nullptr;
nsresult rv = NS_OK;
if (PR_LOG_TEST(gXULLog, PR_LOG_NOTICE)) {
if (MOZ_LOG_TEST(gXULLog, PR_LOG_NOTICE)) {
MOZ_LOG(gXULLog, PR_LOG_NOTICE,
("xul: creating <%s> from prototype",
NS_ConvertUTF16toUTF8(aPrototype->mNodeInfo->QualifiedName()).get()));
@ -3848,7 +3848,7 @@ XULDocument::OverlayForwardReference::Resolve()
if (NS_FAILED(rv)) return eResolve_Error;
}
if (PR_LOG_TEST(gXULLog, PR_LOG_NOTICE)) {
if (MOZ_LOG_TEST(gXULLog, PR_LOG_NOTICE)) {
nsAutoCString idC;
idC.AssignWithConversion(id);
MOZ_LOG(gXULLog, PR_LOG_NOTICE,
@ -4017,7 +4017,7 @@ XULDocument::OverlayForwardReference::Merge(nsIContent* aTargetNode,
XULDocument::OverlayForwardReference::~OverlayForwardReference()
{
if (PR_LOG_TEST(gXULLog, PR_LOG_WARNING) && !mResolved) {
if (MOZ_LOG_TEST(gXULLog, PR_LOG_WARNING) && !mResolved) {
nsAutoString id;
mOverlay->GetAttr(kNameSpaceID_None, nsGkAtoms::id, id);
@ -4060,7 +4060,7 @@ XULDocument::BroadcasterHookup::Resolve()
XULDocument::BroadcasterHookup::~BroadcasterHookup()
{
if (PR_LOG_TEST(gXULLog, PR_LOG_WARNING) && !mResolved) {
if (MOZ_LOG_TEST(gXULLog, PR_LOG_WARNING) && !mResolved) {
// Tell the world we failed
nsAutoString broadcasterID;
@ -4279,7 +4279,7 @@ XULDocument::CheckBroadcasterHookup(Element* aElement,
}
// Tell the world we succeeded
if (PR_LOG_TEST(gXULLog, PR_LOG_NOTICE)) {
if (MOZ_LOG_TEST(gXULLog, PR_LOG_NOTICE)) {
nsCOMPtr<nsIContent> content =
do_QueryInterface(listener);

View File

@ -268,7 +268,7 @@ nsXULCommandDispatcher::AddCommandUpdater(nsIDOMElement* aElement,
if (updater->mElement == aElement) {
#ifdef DEBUG
if (PR_LOG_TEST(gCommandLog, PR_LOG_NOTICE)) {
if (MOZ_LOG_TEST(gCommandLog, PR_LOG_NOTICE)) {
nsAutoCString eventsC, targetsC, aeventsC, atargetsC;
eventsC.AssignWithConversion(updater->mEvents);
targetsC.AssignWithConversion(updater->mTargets);
@ -296,7 +296,7 @@ nsXULCommandDispatcher::AddCommandUpdater(nsIDOMElement* aElement,
updater = updater->mNext;
}
#ifdef DEBUG
if (PR_LOG_TEST(gCommandLog, PR_LOG_NOTICE)) {
if (MOZ_LOG_TEST(gCommandLog, PR_LOG_NOTICE)) {
nsAutoCString aeventsC, atargetsC;
CopyUTF16toUTF8(aEvents, aeventsC);
CopyUTF16toUTF8(aTargets, atargetsC);
@ -331,7 +331,7 @@ nsXULCommandDispatcher::RemoveCommandUpdater(nsIDOMElement* aElement)
while (updater) {
if (updater->mElement == aElement) {
#ifdef DEBUG
if (PR_LOG_TEST(gCommandLog, PR_LOG_NOTICE)) {
if (MOZ_LOG_TEST(gCommandLog, PR_LOG_NOTICE)) {
nsAutoCString eventsC, targetsC;
eventsC.AssignWithConversion(updater->mEvents);
targetsC.AssignWithConversion(updater->mTargets);
@ -391,7 +391,7 @@ nsXULCommandDispatcher::UpdateCommands(const nsAString& aEventName)
nsIContent* content = updaters[u];
#ifdef DEBUG
if (PR_LOG_TEST(gCommandLog, PR_LOG_NOTICE)) {
if (MOZ_LOG_TEST(gCommandLog, PR_LOG_NOTICE)) {
nsAutoCString aeventnameC;
CopyUTF16toUTF8(aEventName, aeventnameC);
MOZ_LOG(gCommandLog, PR_LOG_NOTICE,

View File

@ -739,7 +739,7 @@ XULContentSinkImpl::OpenRoot(const char16_t** aAttributes,
rv = CreateElement(aNodeInfo, &element);
if (NS_FAILED(rv)) {
if (PR_LOG_TEST(gContentSinkLog, PR_LOG_ERROR)) {
if (MOZ_LOG_TEST(gContentSinkLog, PR_LOG_ERROR)) {
nsAutoString anodeC;
aNodeInfo->GetName(anodeC);
MOZ_LOG(gContentSinkLog, PR_LOG_ERROR,
@ -780,7 +780,7 @@ XULContentSinkImpl::OpenTag(const char16_t** aAttributes,
rv = CreateElement(aNodeInfo, &element);
if (NS_FAILED(rv)) {
if (PR_LOG_TEST(gContentSinkLog, PR_LOG_ERROR)) {
if (MOZ_LOG_TEST(gContentSinkLog, PR_LOG_ERROR)) {
nsAutoString anodeC;
aNodeInfo->GetName(anodeC);
MOZ_LOG(gContentSinkLog, PR_LOG_ERROR,
@ -977,7 +977,7 @@ XULContentSinkImpl::AddAttributes(const char16_t** aAttributes,
mDocumentURL);
NS_ENSURE_SUCCESS(rv, rv);
if (PR_LOG_TEST(gContentSinkLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gContentSinkLog, PR_LOG_DEBUG)) {
nsAutoString extraWhiteSpace;
int32_t cnt = mContextStack.Depth();
while (--cnt >= 0)

View File

@ -23,7 +23,7 @@ nsContentTestNode::nsContentTestNode(nsXULTemplateQueryProcessorRDF* aProcessor,
mRefVariable(aRefVariable),
mTag(nullptr)
{
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
nsAutoString tag(NS_LITERAL_STRING("(none)"));
if (mTag)
mTag->ToString(tag);

View File

@ -36,7 +36,7 @@ nsRDFConInstanceTestNode::nsRDFConInstanceTestNode(TestNode* aParent,
mContainer(aContainer),
mEmpty(aEmpty)
{
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
nsAutoCString props;
nsResourceSet& containmentProps = aProcessor->ContainmentProperties();
@ -100,7 +100,7 @@ nsRDFConInstanceTestNode::FilterInstantiations(InstantiationSet& aInstantiations
continue;
}
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
const char* container = "(unbound)";
valueres->GetValueConst(&container);
@ -245,7 +245,7 @@ nsRDFConInstanceTestNode::CanPropagate(nsIRDFResource* aSource,
canpropagate = mProcessor->ContainmentProperties().Contains(aProperty);
}
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
const char* source;
aSource->GetValueConst(&source);

View File

@ -24,7 +24,7 @@ nsRDFConMemberTestNode::nsRDFConMemberTestNode(TestNode* aParent,
mContainerVariable(aContainerVariable),
mMemberVariable(aMemberVariable)
{
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
nsAutoCString props;
nsResourceSet& containmentProps = aProcessor->ContainmentProperties();
@ -111,7 +111,7 @@ nsRDFConMemberTestNode::FilterInstantiations(InstantiationSet& aInstantiations,
hasMemberBinding = inst->mAssignments.GetAssignmentFor(mMemberVariable,
getter_AddRefs(memberValue));
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
const char* container = "(unbound)";
if (hasContainerBinding)
containerRes->GetValueConst(&container);
@ -215,7 +215,7 @@ nsRDFConMemberTestNode::FilterInstantiations(InstantiationSet& aInstantiations,
if (! node)
return NS_ERROR_UNEXPECTED;
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
nsAutoString member;
nsXULContentUtils::GetTextForNode(node, member);
@ -302,7 +302,7 @@ nsRDFConMemberTestNode::FilterInstantiations(InstantiationSet& aInstantiations,
if (! source)
return NS_ERROR_UNEXPECTED;
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
const char* container;
source->GetValueConst(&container);
@ -372,7 +372,7 @@ nsRDFConMemberTestNode::FilterInstantiations(InstantiationSet& aInstantiations,
NS_ASSERTION(value != nullptr, "member is not an nsIRDFNode");
if (! value) continue;
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
nsAutoString s;
nsXULContentUtils::GetTextForNode(value, s);
@ -389,7 +389,7 @@ nsRDFConMemberTestNode::FilterInstantiations(InstantiationSet& aInstantiations,
value = valueRes;
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
const char* s;
valueRes->GetValueConst(&s);
@ -466,7 +466,7 @@ nsRDFConMemberTestNode::CanPropagate(nsIRDFResource* aSource,
canpropagate = mProcessor->ContainmentProperties().Contains(aProperty);
}
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
const char* source;
aSource->GetValueConst(&source);

View File

@ -24,7 +24,7 @@ nsRDFPropertyTestNode::nsRDFPropertyTestNode(TestNode* aParent,
mTargetVariable(aTargetVariable),
mTarget(nullptr)
{
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
const char* prop = "(null)";
if (aProperty)
aProperty->GetValueConst(&prop);
@ -57,7 +57,7 @@ nsRDFPropertyTestNode::nsRDFPropertyTestNode(TestNode* aParent,
mTargetVariable(aTargetVariable),
mTarget(nullptr)
{
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
const char* source = "(null)";
if (aSource)
aSource->GetValueConst(&source);
@ -90,7 +90,7 @@ nsRDFPropertyTestNode::nsRDFPropertyTestNode(TestNode* aParent,
mTargetVariable(0),
mTarget(aTarget)
{
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
nsAutoString svar(NS_LITERAL_STRING("(none)"));
if (mSourceVariable)
mSourceVariable->ToString(svar);
@ -148,7 +148,7 @@ nsRDFPropertyTestNode::FilterInstantiations(InstantiationSet& aInstantiations,
getter_AddRefs(targetValue));
}
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
const char* source = "(unbound)";
if (hasSourceBinding)
sourceRes->GetValueConst(&source);
@ -229,7 +229,7 @@ nsRDFPropertyTestNode::FilterInstantiations(InstantiationSet& aInstantiations,
value = do_QueryInterface(isupports);
NS_ASSERTION(value != nullptr, "target is not an nsIRDFNode");
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
nsAutoString s(NS_LITERAL_STRING("(none found)"));
if (value)
nsXULContentUtils::GetTextForNode(value, s);
@ -248,7 +248,7 @@ nsRDFPropertyTestNode::FilterInstantiations(InstantiationSet& aInstantiations,
nsCOMPtr<nsIRDFResource> source = do_QueryInterface(isupports);
NS_ASSERTION(source != nullptr, "source is not an nsIRDFResource");
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
const char* s = "(none found)";
if (source)
source->GetValueConst(&s);
@ -321,7 +321,7 @@ nsRDFPropertyTestNode::CanPropagate(nsIRDFResource* aSource,
result = true;
}
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
const char* source;
aSource->GetValueConst(&source);
@ -346,7 +346,7 @@ nsRDFPropertyTestNode::Retract(nsIRDFResource* aSource,
nsIRDFNode* aTarget) const
{
if (aProperty == mProperty.get()) {
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
const char* source;
aSource->GetValueConst(&source);

View File

@ -446,7 +446,7 @@ nsXULContentBuilder::BuildContentFromTemplate(nsIContent *aTemplateNode,
nsresult rv;
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
MOZ_LOG(gXULTemplateLog, PR_LOG_ALWAYS,
("nsXULContentBuilder::BuildContentFromTemplate (is unique: %d)",
aIsUnique));
@ -523,7 +523,7 @@ nsXULContentBuilder::BuildContentFromTemplate(nsIContent *aTemplateNode,
nsIAtom *tag = tmplKid->NodeInfo()->NameAtom();
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
("xultemplate[%p] building %s %s %s",
this, nsAtomCString(tag).get(),
@ -1073,7 +1073,7 @@ nsXULContentBuilder::CreateContainerContentsForQuerySet(nsIContent* aElement,
nsIContent** aContainer,
int32_t* aNewIndexInContainer)
{
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
nsAutoString id;
aResult->GetId(id);
MOZ_LOG(gXULTemplateLog, PR_LOG_ALWAYS,

View File

@ -1711,7 +1711,7 @@ nsXULTemplateBuilder::CompileQueries()
}
// always enable logging if the debug setting is used
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG))
if (MOZ_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG))
mFlags |= eLoggingEnabled;
nsCOMPtr<nsIDOMNode> rootnode = do_QueryInterface(mRoot);

View File

@ -483,7 +483,7 @@ nsXULTemplateQueryProcessorRDF::GenerateResults(nsISupports* aDatasource,
mLastRef = aRef;
}
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
nsAutoString id;
aRef->GetId(id);
@ -863,7 +863,7 @@ nsXULTemplateQueryProcessorRDF::Propagate(nsIRDFResource* aSource,
ReteNodeSet livenodes;
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
const char* sourceStr;
aSource->GetValueConst(&sourceStr);
const char* propertyStr;
@ -950,7 +950,7 @@ nsXULTemplateQueryProcessorRDF::Retract(nsIRDFResource* aSource,
nsIRDFNode* aTarget)
{
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
const char* sourceStr;
aSource->GetValueConst(&sourceStr);
const char* propertyStr;
@ -1023,7 +1023,7 @@ nsXULTemplateQueryProcessorRDF::Log(const char* aOperation,
nsIRDFResource* aProperty,
nsIRDFNode* aTarget)
{
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
nsresult rv;
const char* sourceStr;
@ -1269,7 +1269,7 @@ nsXULTemplateQueryProcessorRDF::CompileQueryChild(nsIAtom* aTag,
else if (aTag == nsGkAtoms::member) {
rv = CompileMemberCondition(aQuery, aCondition, aParentNode, aResult);
}
else if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_ALWAYS)) {
else if (MOZ_LOG_TEST(gXULTemplateLog, PR_LOG_ALWAYS)) {
nsAutoString tagstr;
aTag->ToString(tagstr);

View File

@ -232,7 +232,7 @@ gssInit()
void
LogGssError(OM_uint32 maj_stat, OM_uint32 min_stat, const char *prefix)
{
if (!PR_LOG_TEST(gNegotiateLog, PR_LOG_DEBUG)) {
if (!MOZ_LOG_TEST(gNegotiateLog, PR_LOG_DEBUG)) {
return;
}

View File

@ -133,7 +133,7 @@ struct BasicLogger
#if defined(MOZ_WIDGET_GONK) || defined(MOZ_WIDGET_ANDROID)
return true;
#else
if (PR_LOG_TEST(GetGFX2DLog(), PRLogLevelForLevel(aLevel))) {
if (MOZ_LOG_TEST(GetGFX2DLog(), PRLogLevelForLevel(aLevel))) {
return true;
} else if ((PreferenceAccess::sGfxLogLevel >= LOG_DEBUG_PRLOG) ||
(aLevel < LOG_DEBUG)) {
@ -160,7 +160,7 @@ struct BasicLogger
#if defined(MOZ_WIDGET_GONK) || defined(MOZ_WIDGET_ANDROID)
printf_stderr("%s%s", aString.c_str(), aNoNewline ? "" : "\n");
#else
if (PR_LOG_TEST(GetGFX2DLog(), PRLogLevelForLevel(aLevel))) {
if (MOZ_LOG_TEST(GetGFX2DLog(), PRLogLevelForLevel(aLevel))) {
PR_LogPrint("%s%s", aString.c_str(), aNoNewline ? "" : "\n");
} else if ((PreferenceAccess::sGfxLogLevel >= LOG_DEBUG_PRLOG) ||
(aLevel < LOG_DEBUG)) {

View File

@ -2070,7 +2070,7 @@ LayerManager::IsLogEnabled()
{
MOZ_ASSERT(!!sLog,
"layer manager must be created before logging is allowed");
return PR_LOG_TEST(sLog, PR_LOG_DEBUG);
return MOZ_LOG_TEST(sLog, PR_LOG_DEBUG);
}
void

View File

@ -29,17 +29,17 @@ using namespace mozilla;
#define LOG_FONTLIST(args) MOZ_LOG(gfxPlatform::GetLog(eGfxLog_fontlist), \
PR_LOG_DEBUG, args)
#define LOG_FONTLIST_ENABLED() PR_LOG_TEST( \
#define LOG_FONTLIST_ENABLED() MOZ_LOG_TEST( \
gfxPlatform::GetLog(eGfxLog_fontlist), \
PR_LOG_DEBUG)
#define LOG_FONTINIT(args) MOZ_LOG(gfxPlatform::GetLog(eGfxLog_fontinit), \
PR_LOG_DEBUG, args)
#define LOG_FONTINIT_ENABLED() PR_LOG_TEST( \
#define LOG_FONTINIT_ENABLED() MOZ_LOG_TEST( \
gfxPlatform::GetLog(eGfxLog_fontinit), \
PR_LOG_DEBUG)
#define LOG_CMAPDATA_ENABLED() PR_LOG_TEST( \
#define LOG_CMAPDATA_ENABLED() MOZ_LOG_TEST( \
gfxPlatform::GetLog(eGfxLog_cmapdata), \
PR_LOG_DEBUG)

View File

@ -61,7 +61,7 @@ GetFontInfoLog()
#undef LOG
#define LOG(args) MOZ_LOG(GetFontInfoLog(), PR_LOG_DEBUG, args)
#define LOG_ENABLED() PR_LOG_TEST(GetFontInfoLog(), PR_LOG_DEBUG)
#define LOG_ENABLED() MOZ_LOG_TEST(GetFontInfoLog(), PR_LOG_DEBUG)
static cairo_user_data_key_t sFTUserFontDataKey;

View File

@ -38,10 +38,10 @@ using namespace mozilla::unicode;
#define LOG_FONTLIST(args) MOZ_LOG(gfxPlatform::GetLog(eGfxLog_fontlist), \
PR_LOG_DEBUG, args)
#define LOG_FONTLIST_ENABLED() PR_LOG_TEST( \
#define LOG_FONTLIST_ENABLED() MOZ_LOG_TEST( \
gfxPlatform::GetLog(eGfxLog_fontlist), \
PR_LOG_DEBUG)
#define LOG_CMAPDATA_ENABLED() PR_LOG_TEST( \
#define LOG_CMAPDATA_ENABLED() MOZ_LOG_TEST( \
gfxPlatform::GetLog(eGfxLog_cmapdata), \
PR_LOG_DEBUG)

View File

@ -74,7 +74,7 @@ uint32_t gGlyphExtentsSetupFallBackToTight = 0;
#define LOG_FONTINIT(args) MOZ_LOG(gfxPlatform::GetLog(eGfxLog_fontinit), \
PR_LOG_DEBUG, args)
#define LOG_FONTINIT_ENABLED() PR_LOG_TEST( \
#define LOG_FONTINIT_ENABLED() MOZ_LOG_TEST( \
gfxPlatform::GetLog(eGfxLog_fontinit), \
PR_LOG_DEBUG)

View File

@ -1480,7 +1480,7 @@ gfxFontFamily::FindFontForChar(GlobalFontMatch *aMatchData)
PRLogModuleInfo *log = gfxPlatform::GetLog(eGfxLog_textrun);
if (MOZ_UNLIKELY(PR_LOG_TEST(log, PR_LOG_DEBUG))) {
if (MOZ_UNLIKELY(MOZ_LOG_TEST(log, PR_LOG_DEBUG))) {
uint32_t unicodeRange = FindCharUnicodeRange(aMatchData->mCh);
uint32_t script = GetScriptCode(aMatchData->mCh);
MOZ_LOG(log, PR_LOG_DEBUG,\

View File

@ -42,11 +42,11 @@ using namespace mozilla;
#define LOG_FONTLIST(args) MOZ_LOG(gfxPlatform::GetLog(eGfxLog_fontlist), \
PR_LOG_DEBUG, args)
#define LOG_FONTLIST_ENABLED() PR_LOG_TEST( \
#define LOG_FONTLIST_ENABLED() MOZ_LOG_TEST( \
gfxPlatform::GetLog(eGfxLog_fontlist), \
PR_LOG_DEBUG)
#define LOG_CMAPDATA_ENABLED() PR_LOG_TEST( \
#define LOG_CMAPDATA_ENABLED() MOZ_LOG_TEST( \
gfxPlatform::GetLog(eGfxLog_cmapdata), \
PR_LOG_DEBUG)

View File

@ -131,10 +131,10 @@ static NSString* GetNSStringForString(const nsAString& aSrc)
#define LOG_FONTLIST(args) MOZ_LOG(gfxPlatform::GetLog(eGfxLog_fontlist), \
PR_LOG_DEBUG, args)
#define LOG_FONTLIST_ENABLED() PR_LOG_TEST( \
#define LOG_FONTLIST_ENABLED() MOZ_LOG_TEST( \
gfxPlatform::GetLog(eGfxLog_fontlist), \
PR_LOG_DEBUG)
#define LOG_CMAPDATA_ENABLED() PR_LOG_TEST( \
#define LOG_CMAPDATA_ENABLED() MOZ_LOG_TEST( \
gfxPlatform::GetLog(eGfxLog_cmapdata), \
PR_LOG_DEBUG)

View File

@ -25,12 +25,12 @@ using namespace mozilla;
#define LOG_FONTLIST(args) MOZ_LOG(gfxPlatform::GetLog(eGfxLog_fontlist), \
PR_LOG_DEBUG, args)
#define LOG_FONTLIST_ENABLED() PR_LOG_TEST( \
#define LOG_FONTLIST_ENABLED() MOZ_LOG_TEST( \
gfxPlatform::GetLog(eGfxLog_fontlist), \
PR_LOG_DEBUG)
#define LOG_FONTINIT(args) MOZ_LOG(gfxPlatform::GetLog(eGfxLog_fontinit), \
PR_LOG_DEBUG, args)
#define LOG_FONTINIT_ENABLED() PR_LOG_TEST( \
#define LOG_FONTINIT_ENABLED() MOZ_LOG_TEST( \
gfxPlatform::GetLog(eGfxLog_fontinit), \
PR_LOG_DEBUG)
@ -580,7 +580,7 @@ gfxPlatformFontList::SystemFindFontForChar(uint32_t aCh, uint32_t aNextCh,
PRLogModuleInfo *log = gfxPlatform::GetLog(eGfxLog_textrun);
if (MOZ_UNLIKELY(PR_LOG_TEST(log, PR_LOG_WARNING))) {
if (MOZ_UNLIKELY(MOZ_LOG_TEST(log, PR_LOG_WARNING))) {
uint32_t unicodeRange = FindCharUnicodeRange(aCh);
int32_t script = mozilla::unicode::GetScriptCode(aCh);
MOZ_LOG(log, PR_LOG_WARNING,\

View File

@ -2223,7 +2223,7 @@ gfxFontGroup::InitTextRun(gfxContext *aContext,
if (sizeof(T) == sizeof(uint8_t) && !transformedString) {
if (MOZ_UNLIKELY(PR_LOG_TEST(log, PR_LOG_WARNING))) {
if (MOZ_UNLIKELY(MOZ_LOG_TEST(log, PR_LOG_WARNING))) {
nsAutoCString lang;
mStyle.language->ToUTF8String(lang);
nsAutoString families;
@ -2271,7 +2271,7 @@ gfxFontGroup::InitTextRun(gfxContext *aContext,
int32_t runScript = MOZ_SCRIPT_LATIN;
while (scriptRuns.Next(runStart, runLimit, runScript)) {
if (MOZ_UNLIKELY(PR_LOG_TEST(log, PR_LOG_WARNING))) {
if (MOZ_UNLIKELY(MOZ_LOG_TEST(log, PR_LOG_WARNING))) {
nsAutoCString lang;
mStyle.language->ToUTF8String(lang);
nsAutoString families;

View File

@ -34,7 +34,7 @@ gfxUserFontSet::GetUserFontsLog()
}
#define LOG(args) MOZ_LOG(gfxUserFontSet::GetUserFontsLog(), PR_LOG_DEBUG, args)
#define LOG_ENABLED() PR_LOG_TEST(gfxUserFontSet::GetUserFontsLog(), PR_LOG_DEBUG)
#define LOG_ENABLED() MOZ_LOG_TEST(gfxUserFontSet::GetUserFontsLog(), PR_LOG_DEBUG)
static uint64_t sFontSetGeneration = 0;

View File

@ -164,7 +164,7 @@ ProgressTracker::Notify(IProgressObserver* aObserver)
{
MOZ_ASSERT(NS_IsMainThread());
if (PR_LOG_TEST(GetImgLog(), PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(GetImgLog(), PR_LOG_DEBUG)) {
nsRefPtr<Image> image = GetImage();
if (image && image->GetURI()) {
nsRefPtr<ImageURL> uri(image->GetURI());
@ -233,7 +233,7 @@ ProgressTracker::NotifyCurrentState(IProgressObserver* aObserver)
{
MOZ_ASSERT(NS_IsMainThread());
if (PR_LOG_TEST(GetImgLog(), PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(GetImgLog(), PR_LOG_DEBUG)) {
nsRefPtr<Image> image = GetImage();
nsAutoCString spec;
if (image && image->GetURI()) {

View File

@ -894,7 +894,7 @@ imgCacheEntry::UpdateCache(int32_t diff /* = 0 */)
void
imgCacheEntry::SetHasNoProxies(bool hasNoProxies)
{
if (PR_LOG_TEST(GetImgLog(), PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(GetImgLog(), PR_LOG_DEBUG)) {
if (hasNoProxies) {
LOG_FUNC_WITH_PARAM(GetImgLog(), "imgCacheEntry::SetHasNoProxies true",
"uri", mRequest->CacheKey().Spec());
@ -1072,7 +1072,7 @@ imgCacheExpirationTracker::NotifyExpired(imgCacheEntry* entry)
// mechanism doesn't.
nsRefPtr<imgCacheEntry> kungFuDeathGrip(entry);
if (PR_LOG_TEST(GetImgLog(), PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(GetImgLog(), PR_LOG_DEBUG)) {
nsRefPtr<imgRequest> req = entry->GetRequest();
if (req) {
LOG_FUNC_WITH_PARAM(GetImgLog(),
@ -1533,7 +1533,7 @@ imgLoader::CheckCacheLimits(imgCacheTable& cache, imgCacheQueue& queue)
NS_ASSERTION(entry, "imgLoader::CheckCacheLimits -- NULL entry pointer");
if (PR_LOG_TEST(GetImgLog(), PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(GetImgLog(), PR_LOG_DEBUG)) {
nsRefPtr<imgRequest> req = entry->GetRequest();
if (req) {
LOG_STATIC_FUNC_WITH_PARAM(GetImgLog(),
@ -1769,7 +1769,7 @@ imgLoader::ValidateEntry(imgCacheEntry* aEntry,
MOZ_LOG(GetImgLog(), PR_LOG_DEBUG,
("imgLoader::ValidateEntry validating cache entry. "
"validateRequest = %d", validateRequest));
} else if (!key && PR_LOG_TEST(GetImgLog(), PR_LOG_DEBUG)) {
} else if (!key && MOZ_LOG_TEST(GetImgLog(), PR_LOG_DEBUG)) {
nsAutoCString spec;
aURI->GetSpec(spec);
@ -2800,7 +2800,7 @@ imgCacheValidator::OnStartRequest(nsIRequest* aRequest, nsISupports* ctxt)
uri = imageURL->ToIURI();
}
if (PR_LOG_TEST(GetImgLog(), PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(GetImgLog(), PR_LOG_DEBUG)) {
nsAutoCString spec;
uri->GetSpec(spec);
LOG_MSG_WITH_PARAM(GetImgLog(),

View File

@ -51,7 +51,7 @@ GetImgLog()
}
return sImgLog;
}
#define LOG_TEST(level) (GetImgLog() && PR_LOG_TEST(GetImgLog(), (level)))
#define LOG_TEST(level) (GetImgLog() && MOZ_LOG_TEST(GetImgLog(), (level)))
NS_IMPL_ISUPPORTS(imgRequest,
nsIStreamListener, nsIRequestObserver,
@ -260,7 +260,7 @@ imgRequest::RemoveProxy(imgRequestProxy* proxy, nsresult aStatus)
if (mLoader) {
mLoader->SetHasNoProxies(this, mCacheEntry);
}
} else if (PR_LOG_TEST(GetImgLog(), PR_LOG_DEBUG)) {
} else if (MOZ_LOG_TEST(GetImgLog(), PR_LOG_DEBUG)) {
nsAutoCString spec;
mURI->GetSpec(spec);
LOG_MSG_WITH_PARAM(GetImgLog(),

View File

@ -861,7 +861,7 @@ imgRequestProxy::Notify(int32_t aType, const mozilla::gfx::IntRect* aRect)
void
imgRequestProxy::OnLoadComplete(bool aLastPart)
{
if (PR_LOG_TEST(GetImgLog(), PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(GetImgLog(), PR_LOG_DEBUG)) {
nsAutoCString name;
GetName(name);
LOG_FUNC_WITH_PARAM(GetImgLog(), "imgRequestProxy::OnLoadComplete",
@ -907,7 +907,7 @@ imgRequestProxy::OnLoadComplete(bool aLastPart)
void
imgRequestProxy::BlockOnload()
{
if (PR_LOG_TEST(GetImgLog(), PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(GetImgLog(), PR_LOG_DEBUG)) {
nsAutoCString name;
GetName(name);
LOG_FUNC_WITH_PARAM(GetImgLog(), "imgRequestProxy::BlockOnload",
@ -923,7 +923,7 @@ imgRequestProxy::BlockOnload()
void
imgRequestProxy::UnblockOnload()
{
if (PR_LOG_TEST(GetImgLog(), PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(GetImgLog(), PR_LOG_DEBUG)) {
nsAutoCString name;
GetName(name);
LOG_FUNC_WITH_PARAM(GetImgLog(), "imgRequestProxy::UnblockOnload",

View File

@ -31,7 +31,7 @@ static bool Init()
{
g_LogMod = PR_NewLogModule("xpclog");
g_Spaces = new char[SPACE_COUNT+1];
if (!g_LogMod || !g_Spaces || !PR_LOG_TEST(g_LogMod,1)) {
if (!g_LogMod || !g_Spaces || !MOZ_LOG_TEST(g_LogMod,1)) {
g_InitState = 1;
XPC_Log_Finish();
return false;
@ -71,7 +71,7 @@ XPC_Log_print(const char* fmt, ...)
bool
XPC_Log_Check(int i)
{
return CAN_RUN && PR_LOG_TEST(g_LogMod,1);
return CAN_RUN && MOZ_LOG_TEST(g_LogMod,1);
}
void

View File

@ -1005,7 +1005,7 @@ LogTextPerfStats(gfxTextPerfMetrics* aTextPerf,
logLevel = PR_LOG_DEBUG;
}
if (!PR_LOG_TEST(tpLog, logLevel)) {
if (!MOZ_LOG_TEST(tpLog, logLevel)) {
return;
}
@ -2709,7 +2709,7 @@ PresShell::BeginLoad(nsIDocument *aDocument)
tp = mPresContext->GetTextPerfMetrics();
}
bool shouldLog = gLog && PR_LOG_TEST(gLog, PR_LOG_DEBUG);
bool shouldLog = gLog && MOZ_LOG_TEST(gLog, PR_LOG_DEBUG);
if (shouldLog || tp) {
mLoadBegin = TimeStamp::Now();
}
@ -2745,7 +2745,7 @@ PresShell::LoadComplete()
}
// log load
bool shouldLog = gLog && PR_LOG_TEST(gLog, PR_LOG_DEBUG);
bool shouldLog = gLog && MOZ_LOG_TEST(gLog, PR_LOG_DEBUG);
if (shouldLog || tp) {
TimeDuration loadTime = TimeStamp::Now() - mLoadBegin;
nsIURI* uri = mDocument->GetDocumentURI();

View File

@ -1707,7 +1707,7 @@ nsPrintEngine::SetupToPrintContent()
NS_ENSURE_SUCCESS(rv, rv);
}
if (PR_LOG_TEST(GetPrintingLog(), PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(GetPrintingLog(), PR_LOG_DEBUG)) {
float calcRatio = 0.0f;
if (mPrt->mPrintDocList.Length() > 1 && mPrt->mPrintObject->mFrameType == eFrameSet) {
nsPrintObject* smallestPO = FindSmallestSTF();

View File

@ -38,7 +38,7 @@ using namespace mozilla;
using namespace mozilla::dom;
#define LOG(args) MOZ_LOG(gfxUserFontSet::GetUserFontsLog(), PR_LOG_DEBUG, args)
#define LOG_ENABLED() PR_LOG_TEST(gfxUserFontSet::GetUserFontsLog(), \
#define LOG_ENABLED() MOZ_LOG_TEST(gfxUserFontSet::GetUserFontsLog(), \
PR_LOG_DEBUG)
#define FONT_LOADING_API_ENABLED_PREF "layout.css.font-loading-api.enabled"

View File

@ -270,10 +270,10 @@ GetLoaderLog()
#define LOG_DEBUG(args) MOZ_LOG(GetLoaderLog(), PR_LOG_DEBUG, args)
#define LOG(args) LOG_DEBUG(args)
#define LOG_FORCE_ENABLED() PR_LOG_TEST(GetLoaderLog(), PR_LOG_ALWAYS)
#define LOG_ERROR_ENABLED() PR_LOG_TEST(GetLoaderLog(), PR_LOG_ERROR)
#define LOG_WARN_ENABLED() PR_LOG_TEST(GetLoaderLog(), PR_LOG_WARNING)
#define LOG_DEBUG_ENABLED() PR_LOG_TEST(GetLoaderLog(), PR_LOG_DEBUG)
#define LOG_FORCE_ENABLED() MOZ_LOG_TEST(GetLoaderLog(), PR_LOG_ALWAYS)
#define LOG_ERROR_ENABLED() MOZ_LOG_TEST(GetLoaderLog(), PR_LOG_ERROR)
#define LOG_WARN_ENABLED() MOZ_LOG_TEST(GetLoaderLog(), PR_LOG_WARNING)
#define LOG_DEBUG_ENABLED() MOZ_LOG_TEST(GetLoaderLog(), PR_LOG_DEBUG)
#define LOG_ENABLED() LOG_DEBUG_ENABLED()
#define LOG_URI(format, uri) \

View File

@ -26,7 +26,7 @@
using namespace mozilla;
#define LOG(args) MOZ_LOG(gfxUserFontSet::GetUserFontsLog(), PR_LOG_DEBUG, args)
#define LOG_ENABLED() PR_LOG_TEST(gfxUserFontSet::GetUserFontsLog(), \
#define LOG_ENABLED() MOZ_LOG_TEST(gfxUserFontSet::GetUserFontsLog(), \
PR_LOG_DEBUG)
nsFontFaceLoader::nsFontFaceLoader(gfxUserFontEntry* aUserFontEntry,

View File

@ -29,7 +29,7 @@
#define MOZ_MTLOG(level, b) \
do { \
if (PR_LOG_TEST(getLogModule(), level)) { \
if (MOZ_LOG_TEST(getLogModule(), level)) { \
std::stringstream str; \
str << b; \
MOZ_LOG(getLogModule(), level, ("%s", str.str().c_str())); \

View File

@ -47,7 +47,7 @@ void CSFLogV(CSFLogLevel priority, const char* sourceFile, int sourceLine, const
GetSignalingLogInfo();
// Skip doing any of this work if we're not logging the indicated level...
if (!PR_LOG_TEST(gLogModuleInfo,level)) {
if (!MOZ_LOG_TEST(gLogModuleInfo,level)) {
return;
}

View File

@ -555,7 +555,7 @@ WebrtcAudioConduit::SendAudioFrame(const int16_t audio_data[],
}
#if !defined(MOZILLA_EXTERNAL_LINKAGE)
if (PR_LOG_TEST(GetLatencyLog(), PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(GetLatencyLog(), PR_LOG_DEBUG)) {
struct Processing insert = { TimeStamp::Now(), 0 };
mProcessing.AppendElement(insert);
}
@ -667,7 +667,7 @@ WebrtcAudioConduit::GetAudioFrame(int16_t speechData[],
}
#if !defined(MOZILLA_EXTERNAL_LINKAGE)
if (PR_LOG_TEST(GetLatencyLog(), PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(GetLatencyLog(), PR_LOG_DEBUG)) {
if (mProcessing.Length() > 0) {
unsigned int now;
mPtrVoEVideoSync->GetPlayoutTimestamp(mChannel, now);
@ -704,7 +704,7 @@ WebrtcAudioConduit::ReceivedRTPPacket(const void *data, int len)
if(mEngineReceiving)
{
#if !defined(MOZILLA_EXTERNAL_LINKAGE)
if (PR_LOG_TEST(GetLatencyLog(), PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(GetLatencyLog(), PR_LOG_DEBUG)) {
// timestamp is at 32 bits in ([1])
struct Processing insert = { TimeStamp::Now(),
ntohl(static_cast<const uint32_t *>(data)[1]) };
@ -842,7 +842,7 @@ int WebrtcAudioConduit::SendPacket(int channel, const void* data, int len)
CSFLogDebug(logTag, "%s : channel %d", __FUNCTION__, channel);
#if !defined(MOZILLA_EXTERNAL_LINKAGE)
if (PR_LOG_TEST(GetLatencyLog(), PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(GetLatencyLog(), PR_LOG_DEBUG)) {
if (mProcessing.Length() > 0) {
TimeStamp started = mProcessing[0].mTimeStamp;
mProcessing.RemoveElementAt(0);

View File

@ -365,7 +365,7 @@ bool PCUuidGenerator::Generate(std::string* idp) {
PeerConnectionImpl::PeerConnectionImpl(const GlobalObject* aGlobal)
: mTimeCard(PR_LOG_TEST(signalingLogInfo(),PR_LOG_ERROR) ?
: mTimeCard(MOZ_LOG_TEST(signalingLogInfo(),PR_LOG_ERROR) ?
create_timecard() : nullptr)
, mSignalingState(PCImplSignalingState::SignalingStable)
, mIceConnectionState(PCImplIceConnectionState::New)

View File

@ -52,7 +52,7 @@ static NS_DEFINE_CID(kZipReaderCID, NS_ZIPREADER_CID);
static PRLogModuleInfo *gJarProtocolLog = nullptr;
#define LOG(args) MOZ_LOG(gJarProtocolLog, PR_LOG_DEBUG, args)
#define LOG_ENABLED() PR_LOG_TEST(gJarProtocolLog, 4)
#define LOG_ENABLED() MOZ_LOG_TEST(gJarProtocolLog, 4)
//-----------------------------------------------------------------------------
// nsJARInputThunk

View File

@ -35,7 +35,7 @@ namespace net {
// NSPR_LOG_MODULES=BackgroundFileSaver:5
PRLogModuleInfo *BackgroundFileSaver::prlog = nullptr;
#define LOG(args) MOZ_LOG(BackgroundFileSaver::prlog, PR_LOG_DEBUG, args)
#define LOG_ENABLED() PR_LOG_TEST(BackgroundFileSaver::prlog, 4)
#define LOG_ENABLED() MOZ_LOG_TEST(BackgroundFileSaver::prlog, 4)
////////////////////////////////////////////////////////////////////////////////
//// Globals

View File

@ -92,7 +92,7 @@ nsDirectoryIndexStream::Init(nsIFile* aDir)
if (!isDir)
return NS_ERROR_ILLEGAL_VALUE;
if (PR_LOG_TEST(gLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gLog, PR_LOG_DEBUG)) {
nsAutoCString path;
aDir->GetNativePath(path);
MOZ_LOG(gLog, PR_LOG_DEBUG,
@ -239,7 +239,7 @@ nsDirectoryIndexStream::Read(char* aBuf, uint32_t aCount, uint32_t* aReadCount)
nsIFile* current = mArray.ObjectAt(mPos);
++mPos;
if (PR_LOG_TEST(gLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gLog, PR_LOG_DEBUG)) {
nsAutoCString path;
current->GetNativePath(path);
MOZ_LOG(gLog, PR_LOG_DEBUG,

View File

@ -325,7 +325,7 @@ nsLoadGroup::Cancel(nsresult status)
continue;
}
if (PR_LOG_TEST(gLoadGroupLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gLoadGroupLog, PR_LOG_DEBUG)) {
nsAutoCString nameStr;
request->GetName(nameStr);
LOG(("LOADGROUP [%x]: Canceling request %x %s.\n",
@ -393,7 +393,7 @@ nsLoadGroup::Suspend()
if (!request)
continue;
if (PR_LOG_TEST(gLoadGroupLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gLoadGroupLog, PR_LOG_DEBUG)) {
nsAutoCString nameStr;
request->GetName(nameStr);
LOG(("LOADGROUP [%x]: Suspending request %x %s.\n",
@ -445,7 +445,7 @@ nsLoadGroup::Resume()
if (!request)
continue;
if (PR_LOG_TEST(gLoadGroupLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gLoadGroupLog, PR_LOG_DEBUG)) {
nsAutoCString nameStr;
request->GetName(nameStr);
LOG(("LOADGROUP [%x]: Resuming request %x %s.\n",
@ -534,7 +534,7 @@ nsLoadGroup::AddRequest(nsIRequest *request, nsISupports* ctxt)
{
nsresult rv;
if (PR_LOG_TEST(gLoadGroupLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gLoadGroupLog, PR_LOG_DEBUG)) {
nsAutoCString nameStr;
request->GetName(nameStr);
LOG(("LOADGROUP [%x]: Adding request %x %s (count=%d).\n",
@ -631,7 +631,7 @@ nsLoadGroup::RemoveRequest(nsIRequest *request, nsISupports* ctxt,
NS_ENSURE_ARG_POINTER(request);
nsresult rv;
if (PR_LOG_TEST(gLoadGroupLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gLoadGroupLog, PR_LOG_DEBUG)) {
nsAutoCString nameStr;
request->GetName(nameStr);
LOG(("LOADGROUP [%x]: Removing request %x %s status %x (count=%d).\n",

View File

@ -30,14 +30,14 @@ struct PRPollDesc;
//
extern PRLogModuleInfo *gSocketTransportLog;
#define SOCKET_LOG(args) MOZ_LOG(gSocketTransportLog, PR_LOG_DEBUG, args)
#define SOCKET_LOG_ENABLED() PR_LOG_TEST(gSocketTransportLog, PR_LOG_DEBUG)
#define SOCKET_LOG_ENABLED() MOZ_LOG_TEST(gSocketTransportLog, PR_LOG_DEBUG)
//
// set NSPR_LOG_MODULES=UDPSocket:5
//
extern PRLogModuleInfo *gUDPSocketLog;
#define UDPSOCKET_LOG(args) PR_LOG(gUDPSocketLog, PR_LOG_DEBUG, args)
#define UDPSOCKET_LOG_ENABLED() PR_LOG_TEST(gUDPSocketLog, PR_LOG_DEBUG)
#define UDPSOCKET_LOG_ENABLED() MOZ_LOG_TEST(gUDPSocketLog, PR_LOG_DEBUG)
//-----------------------------------------------------------------------------

View File

@ -46,7 +46,7 @@ static PRLogModuleInfo *gStandardURLLog;
#undef LOG
#define LOG(args) MOZ_LOG(gStandardURLLog, PR_LOG_DEBUG, args)
#undef LOG_ENABLED
#define LOG_ENABLED() PR_LOG_TEST(gStandardURLLog, PR_LOG_DEBUG)
#define LOG_ENABLED() MOZ_LOG_TEST(gStandardURLLog, PR_LOG_DEBUG)
//----------------------------------------------------------------------------

View File

@ -1767,7 +1767,7 @@ nsCacheService::CreateCustomOfflineDevice(nsIFile *aProfileDir,
{
NS_ENSURE_ARG(aProfileDir);
if (PR_LOG_TEST(gCacheLog, PR_LOG_ALWAYS)) {
if (MOZ_LOG_TEST(gCacheLog, PR_LOG_ALWAYS)) {
nsAutoCString profilePath;
aProfileDir->GetNativePath(profilePath);
CACHE_LOG_ALWAYS(("Creating custom offline device, %s, %d",

View File

@ -225,7 +225,7 @@ nsOfflineCacheEvictionFunction::Apply()
LOG(("nsOfflineCacheEvictionFunction::Apply\n"));
for (int32_t i = 0; i < mItems.Count(); i++) {
if (PR_LOG_TEST(gCacheLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gCacheLog, PR_LOG_DEBUG)) {
nsAutoCString path;
mItems[i]->GetNativePath(path);
LOG((" removing %s\n", path.get()));

View File

@ -12,7 +12,7 @@ namespace net {
extern PRLogModuleInfo* GetCache2Log();
#define LOG(x) MOZ_LOG(GetCache2Log(), PR_LOG_DEBUG, x)
#define LOG_ENABLED() PR_LOG_TEST(GetCache2Log(), PR_LOG_DEBUG)
#define LOG_ENABLED() MOZ_LOG_TEST(GetCache2Log(), PR_LOG_DEBUG)
} // net
} // mozilla

View File

@ -204,7 +204,7 @@ GetCookieLog()
#define COOKIE_LOGEVICTED(a, details) \
PR_BEGIN_MACRO \
if (PR_LOG_TEST(GetCookieLog(), PR_LOG_DEBUG)) \
if (MOZ_LOG_TEST(GetCookieLog(), PR_LOG_DEBUG)) \
LogEvicted(a, details); \
PR_END_MACRO
@ -218,7 +218,7 @@ static void
LogFailure(bool aSetCookie, nsIURI *aHostURI, const char *aCookieString, const char *aReason)
{
// if logging isn't enabled, return now to save cycles
if (!PR_LOG_TEST(GetCookieLog(), PR_LOG_WARNING))
if (!MOZ_LOG_TEST(GetCookieLog(), PR_LOG_WARNING))
return;
nsAutoCString spec;
@ -277,7 +277,7 @@ static void
LogSuccess(bool aSetCookie, nsIURI *aHostURI, const char *aCookieString, nsCookie *aCookie, bool aReplacing)
{
// if logging isn't enabled, return now to save cycles
if (!PR_LOG_TEST(GetCookieLog(), PR_LOG_DEBUG)) {
if (!MOZ_LOG_TEST(GetCookieLog(), PR_LOG_DEBUG)) {
return;
}
@ -351,7 +351,7 @@ protected:
public:
NS_IMETHOD HandleError(mozIStorageError* aError) override
{
if (PR_LOG_TEST(GetCookieLog(), PR_LOG_WARNING)) {
if (MOZ_LOG_TEST(GetCookieLog(), PR_LOG_WARNING)) {
int32_t result = -1;
aError->GetResult(&result);

View File

@ -44,11 +44,11 @@ extern PRLogModuleInfo *gHttpLog;
#define LOG5(args) MOZ_LOG(gHttpLog, 5, args)
#define LOG(args) LOG4(args)
#define LOG1_ENABLED() PR_LOG_TEST(gHttpLog, 1)
#define LOG2_ENABLED() PR_LOG_TEST(gHttpLog, 2)
#define LOG3_ENABLED() PR_LOG_TEST(gHttpLog, 3)
#define LOG4_ENABLED() PR_LOG_TEST(gHttpLog, 4)
#define LOG5_ENABLED() PR_LOG_TEST(gHttpLog, 5)
#define LOG1_ENABLED() MOZ_LOG_TEST(gHttpLog, 1)
#define LOG2_ENABLED() MOZ_LOG_TEST(gHttpLog, 2)
#define LOG3_ENABLED() MOZ_LOG_TEST(gHttpLog, 3)
#define LOG4_ENABLED() MOZ_LOG_TEST(gHttpLog, 4)
#define LOG5_ENABLED() MOZ_LOG_TEST(gHttpLog, 5)
#define LOG_ENABLED() LOG4_ENABLED()
#endif // HttpLog_h__

View File

@ -447,7 +447,7 @@ nsResProtocolHandler::ResolveURI(nsIURI *uri, nsACString &result)
rv = baseURI->Resolve(nsDependentCString(p, path.Length()-1), result);
if (PR_LOG_TEST(gResLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gResLog, PR_LOG_DEBUG)) {
nsAutoCString spec;
uri->GetAsciiSpec(spec);
MOZ_LOG(gResLog, PR_LOG_DEBUG,

View File

@ -32,10 +32,10 @@ extern PRLogModuleInfo *gWyciwygLog;
#define LOG4(args) MOZ_LOG(gWyciwygLog, 4, args)
#define LOG(args) LOG4(args)
#define LOG1_ENABLED() PR_LOG_TEST(gWyciwygLog, 1)
#define LOG2_ENABLED() PR_LOG_TEST(gWyciwygLog, 2)
#define LOG3_ENABLED() PR_LOG_TEST(gWyciwygLog, 3)
#define LOG4_ENABLED() PR_LOG_TEST(gWyciwygLog, 4)
#define LOG1_ENABLED() MOZ_LOG_TEST(gWyciwygLog, 1)
#define LOG2_ENABLED() MOZ_LOG_TEST(gWyciwygLog, 2)
#define LOG3_ENABLED() MOZ_LOG_TEST(gWyciwygLog, 3)
#define LOG4_ENABLED() MOZ_LOG_TEST(gWyciwygLog, 4)
#define LOG_ENABLED() LOG4_ENABLED()
#define WYCIWYG_TYPE "text/html"

View File

@ -178,7 +178,7 @@ debug_printf(const char *format, ...)
va_list ap;
char buffer[1024];
if (PR_LOG_TEST(GetSCTPLog(), PR_LOG_ALWAYS)) {
if (MOZ_LOG_TEST(GetSCTPLog(), PR_LOG_ALWAYS)) {
va_start(ap, format);
#ifdef _WIN32
if (vsnprintf_s(buffer, sizeof(buffer), _TRUNCATE, format, ap) > 0) {
@ -335,7 +335,7 @@ DataChannelConnection::Init(unsigned short aPort, uint16_t aNumStreams, bool aUs
}
// Set logging to SCTP:PR_LOG_DEBUG to get SCTP debugs
if (PR_LOG_TEST(GetSCTPLog(), PR_LOG_ALWAYS)) {
if (MOZ_LOG_TEST(GetSCTPLog(), PR_LOG_ALWAYS)) {
usrsctp_sysctl_set_sctp_debug_on(SCTP_DEBUG_ALL);
}
@ -653,7 +653,7 @@ void
DataChannelConnection::SctpDtlsInput(TransportFlow *flow,
const unsigned char *data, size_t len)
{
if (PR_LOG_TEST(GetSCTPLog(), PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(GetSCTPLog(), PR_LOG_DEBUG)) {
char *buf;
if ((buf = usrsctp_dumppacket((void *)data, len, SCTP_DUMP_INBOUND)) != nullptr) {
@ -683,7 +683,7 @@ DataChannelConnection::SctpDtlsOutput(void *addr, void *buffer, size_t length,
DataChannelConnection *peer = static_cast<DataChannelConnection *>(addr);
int res;
if (PR_LOG_TEST(GetSCTPLog(), PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(GetSCTPLog(), PR_LOG_DEBUG)) {
char *buf;
if ((buf = usrsctp_dumppacket(buffer, length, SCTP_DUMP_OUTBOUND)) != nullptr) {

View File

@ -424,7 +424,7 @@ nsSOCKSSocketInfo::ConnectToProxy(PRFileDesc *fd)
return PR_FAILURE;
}
if (PR_LOG_TEST(gSOCKSLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gSOCKSLog, PR_LOG_DEBUG)) {
char buf[kIPv6CStrBufSize];
NetAddrToString(&mInternalProxyAddr, buf, sizeof(buf));
LOGDEBUG(("socks: trying proxy server, %s:%hu",

View File

@ -849,7 +849,7 @@ InMemoryDataSource::LogOperation(const char* aOperation,
nsIRDFNode* aTarget,
bool aTruthValue)
{
if (! PR_LOG_TEST(gLog, PR_LOG_NOTICE))
if (! MOZ_LOG_TEST(gLog, PR_LOG_NOTICE))
return;
nsXPIDLCString uri;

View File

@ -323,7 +323,7 @@ RDFContentSinkImpl::~RDFContentSinkImpl()
// print some fairly useless debugging info
// XXX we should save line numbers on the context stack: this'd
// be about 1000x more helpful.
if (resource && PR_LOG_TEST(gLog, PR_LOG_NOTICE)) {
if (resource && MOZ_LOG_TEST(gLog, PR_LOG_NOTICE)) {
nsXPIDLCString uri;
resource->GetValue(getter_Copies(uri));
MOZ_LOG(gLog, PR_LOG_NOTICE,
@ -438,7 +438,7 @@ RDFContentSinkImpl::HandleEndElement(const char16_t *aName)
nsIRDFResource* resource;
if (NS_FAILED(PopContext(resource, mState, mParseMode))) {
// XXX parser didn't catch unmatched tags?
if (PR_LOG_TEST(gLog, PR_LOG_WARNING)) {
if (MOZ_LOG_TEST(gLog, PR_LOG_WARNING)) {
nsAutoString tagStr(aName);
char* tagCStr = ToNewCString(tagStr);

View File

@ -827,7 +827,7 @@ RDFXMLDataSourceImpl::Flush(void)
if (! mURL)
return NS_ERROR_NOT_INITIALIZED;
if (PR_LOG_TEST(gLog, PR_LOG_NOTICE)) {
if (MOZ_LOG_TEST(gLog, PR_LOG_NOTICE)) {
nsAutoCString spec;
mURL->GetSpec(spec);
MOZ_LOG(gLog, PR_LOG_NOTICE,
@ -969,7 +969,7 @@ RDFXMLDataSourceImpl::Refresh(bool aBlocking)
NS_IMETHODIMP
RDFXMLDataSourceImpl::BeginLoad(void)
{
if (PR_LOG_TEST(gLog, PR_LOG_NOTICE)) {
if (MOZ_LOG_TEST(gLog, PR_LOG_NOTICE)) {
nsAutoCString spec;
if (mURL) {
mURL->GetSpec(spec);
@ -995,7 +995,7 @@ RDFXMLDataSourceImpl::BeginLoad(void)
NS_IMETHODIMP
RDFXMLDataSourceImpl::Interrupt(void)
{
if (PR_LOG_TEST(gLog, PR_LOG_NOTICE)) {
if (MOZ_LOG_TEST(gLog, PR_LOG_NOTICE)) {
nsAutoCString spec;
if (mURL) {
mURL->GetSpec(spec);
@ -1020,7 +1020,7 @@ RDFXMLDataSourceImpl::Interrupt(void)
NS_IMETHODIMP
RDFXMLDataSourceImpl::Resume(void)
{
if (PR_LOG_TEST(gLog, PR_LOG_NOTICE)) {
if (MOZ_LOG_TEST(gLog, PR_LOG_NOTICE)) {
nsAutoCString spec;
if (mURL) {
mURL->GetSpec(spec);
@ -1045,7 +1045,7 @@ RDFXMLDataSourceImpl::Resume(void)
NS_IMETHODIMP
RDFXMLDataSourceImpl::EndLoad(void)
{
if (PR_LOG_TEST(gLog, PR_LOG_NOTICE)) {
if (MOZ_LOG_TEST(gLog, PR_LOG_NOTICE)) {
nsAutoCString spec;
if (mURL) {
mURL->GetSpec(spec);

View File

@ -39,7 +39,7 @@ GetNTLMLog()
}
#define LOG(x) MOZ_LOG(GetNTLMLog(), PR_LOG_DEBUG, x)
#define LOG_ENABLED() PR_LOG_TEST(GetNTLMLog(), PR_LOG_DEBUG)
#define LOG_ENABLED() MOZ_LOG_TEST(GetNTLMLog(), PR_LOG_DEBUG)
static void des_makekey(const uint8_t *raw, uint8_t *key);
static void des_encrypt(const uint8_t *key, const uint8_t *src, uint8_t *hash);

View File

@ -128,7 +128,7 @@ NS_IMPL_ISUPPORTS(nsSecureBrowserUIImpl,
NS_IMETHODIMP
nsSecureBrowserUIImpl::Init(nsIDOMWindow *aWindow)
{
if (PR_LOG_TEST(gSecureDocLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gSecureDocLog, PR_LOG_DEBUG)) {
nsCOMPtr<nsIDOMWindow> window(do_QueryReferent(mWindow));
MOZ_LOG(gSecureDocLog, PR_LOG_DEBUG,
@ -636,7 +636,7 @@ nsSecureBrowserUIImpl::OnStateChange(nsIWebProgress* aWebProgress,
return NS_ERROR_NULL_POINTER;
}
if (PR_LOG_TEST(gSecureDocLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gSecureDocLog, PR_LOG_DEBUG)) {
nsXPIDLCString reqname;
aRequest->GetName(reqname);
MOZ_LOG(gSecureDocLog, PR_LOG_DEBUG,

View File

@ -244,7 +244,7 @@ Vacuumer::HandleError(mozIStorageError *aError)
NS_WARNING(warnMsg.get());
#endif
if (PR_LOG_TEST(gStorageLog, PR_LOG_ERROR)) {
if (MOZ_LOG_TEST(gStorageLog, PR_LOG_ERROR)) {
int32_t result;
nsresult rv = aError->GetResult(&result);
NS_ENSURE_SUCCESS(rv, rv);

View File

@ -694,7 +694,7 @@ Connection::initializeInternal()
// SQLite tracing can slow down queries (especially long queries)
// significantly. Don't trace unless the user is actively monitoring SQLite.
if (PR_LOG_TEST(gStorageLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gStorageLog, PR_LOG_DEBUG)) {
::sqlite3_trace(mDBConn, tracefunc, this);
MOZ_LOG(gStorageLog, PR_LOG_NOTICE, ("Opening connection to '%s' (%p)",
@ -923,7 +923,7 @@ Connection::internalClose(sqlite3 *aNativeConnection)
}
#endif // DEBUG
if (PR_LOG_TEST(gStorageLog, PR_LOG_NOTICE)) {
if (MOZ_LOG_TEST(gStorageLog, PR_LOG_NOTICE)) {
nsAutoCString leafName(":memory");
if (mDatabaseFile)
(void)mDatabaseFile->GetNativeLeafName(leafName);

View File

@ -604,7 +604,7 @@ Statement::ExecuteStep(bool *_moreResults)
}
int srv = mDBConnection->stepStatement(mNativeConnection, mDBStatement);
if (srv != SQLITE_ROW && srv != SQLITE_DONE && PR_LOG_TEST(gStorageLog, PR_LOG_DEBUG)) {
if (srv != SQLITE_ROW && srv != SQLITE_DONE && MOZ_LOG_TEST(gStorageLog, PR_LOG_DEBUG)) {
nsAutoCString errStr;
(void)mDBConnection->GetLastErrorString(errStr);
MOZ_LOG(gStorageLog, PR_LOG_DEBUG,

View File

@ -67,7 +67,7 @@ using safe_browsing::ClientDownloadRequest_SignatureInfo;
// NSPR_LOG_MODULES=ApplicationReputation:5
PRLogModuleInfo *ApplicationReputationService::prlog = nullptr;
#define LOG(args) MOZ_LOG(ApplicationReputationService::prlog, PR_LOG_DEBUG, args)
#define LOG_ENABLED() PR_LOG_TEST(ApplicationReputationService::prlog, PR_LOG_DEBUG)
#define LOG_ENABLED() MOZ_LOG_TEST(ApplicationReputationService::prlog, PR_LOG_DEBUG)
class PendingDBLookup;

View File

@ -18,7 +18,7 @@
// NSPR_LOG_MODULES=UrlClassifierDbService:5
extern PRLogModuleInfo *gUrlClassifierDbServiceLog;
#define LOG(args) MOZ_LOG(gUrlClassifierDbServiceLog, PR_LOG_DEBUG, args)
#define LOG_ENABLED() PR_LOG_TEST(gUrlClassifierDbServiceLog, PR_LOG_DEBUG)
#define LOG_ENABLED() MOZ_LOG_TEST(gUrlClassifierDbServiceLog, PR_LOG_DEBUG)
#define STORE_DIRECTORY NS_LITERAL_CSTRING("safebrowsing")
#define TO_DELETE_DIR_SUFFIX NS_LITERAL_CSTRING("-to_delete")

View File

@ -94,7 +94,7 @@
// NSPR_LOG_MODULES=UrlClassifierDbService:5
extern PRLogModuleInfo *gUrlClassifierDbServiceLog;
#define LOG(args) MOZ_LOG(gUrlClassifierDbServiceLog, PR_LOG_DEBUG, args)
#define LOG_ENABLED() PR_LOG_TEST(gUrlClassifierDbServiceLog, PR_LOG_DEBUG)
#define LOG_ENABLED() MOZ_LOG_TEST(gUrlClassifierDbServiceLog, PR_LOG_DEBUG)
// Either the return was successful or we call the Reset function (unless we
// hit an OOM). Used while reading in the store.

View File

@ -35,7 +35,7 @@
// NSPR_LOG_MODULES=UrlClassifierDbService:5
extern PRLogModuleInfo *gUrlClassifierDbServiceLog;
#define LOG(args) MOZ_LOG(gUrlClassifierDbServiceLog, PR_LOG_DEBUG, args)
#define LOG_ENABLED() PR_LOG_TEST(gUrlClassifierDbServiceLog, PR_LOG_DEBUG)
#define LOG_ENABLED() MOZ_LOG_TEST(gUrlClassifierDbServiceLog, PR_LOG_DEBUG)
namespace mozilla {
namespace safebrowsing {

View File

@ -15,7 +15,7 @@
// NSPR_LOG_MODULES=UrlClassifierDbService:5
extern PRLogModuleInfo *gUrlClassifierDbServiceLog;
#define LOG(args) MOZ_LOG(gUrlClassifierDbServiceLog, PR_LOG_DEBUG, args)
#define LOG_ENABLED() PR_LOG_TEST(gUrlClassifierDbServiceLog, PR_LOG_DEBUG)
#define LOG_ENABLED() MOZ_LOG_TEST(gUrlClassifierDbServiceLog, PR_LOG_DEBUG)
namespace mozilla {
namespace safebrowsing {

View File

@ -57,7 +57,7 @@ using namespace mozilla::safebrowsing;
// NSPR_LOG_MODULES=UrlClassifierDbService:5
PRLogModuleInfo *gUrlClassifierDbServiceLog = nullptr;
#define LOG(args) MOZ_LOG(gUrlClassifierDbServiceLog, PR_LOG_DEBUG, args)
#define LOG_ENABLED() PR_LOG_TEST(gUrlClassifierDbServiceLog, PR_LOG_DEBUG)
#define LOG_ENABLED() MOZ_LOG_TEST(gUrlClassifierDbServiceLog, PR_LOG_DEBUG)
// Prefs for implementing nsIURIClassifier to block page loads
#define CHECK_MALWARE_PREF "browser.safebrowsing.malware.enabled"

View File

@ -25,7 +25,7 @@ using namespace mozilla;
// NSPR_LOG_MODULES=UrlClassifierPrefixSet:5
static const PRLogModuleInfo *gUrlClassifierPrefixSetLog = nullptr;
#define LOG(args) MOZ_LOG(gUrlClassifierPrefixSetLog, PR_LOG_DEBUG, args)
#define LOG_ENABLED() PR_LOG_TEST(gUrlClassifierPrefixSetLog, PR_LOG_DEBUG)
#define LOG_ENABLED() MOZ_LOG_TEST(gUrlClassifierPrefixSetLog, PR_LOG_DEBUG)
NS_IMPL_ISUPPORTS(
nsUrlClassifierPrefixSet, nsIUrlClassifierPrefixSet, nsIMemoryReporter)

View File

@ -389,7 +389,7 @@ nsDocLoader::OnStartRequest(nsIRequest *request, nsISupports *aCtxt)
{
// called each time a request is added to the group.
if (PR_LOG_TEST(gDocLoaderLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gDocLoaderLog, PR_LOG_DEBUG)) {
nsAutoCString name;
request->GetName(name);
@ -469,7 +469,7 @@ nsDocLoader::OnStopRequest(nsIRequest *aRequest,
{
nsresult rv = NS_OK;
if (PR_LOG_TEST(gDocLoaderLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gDocLoaderLog, PR_LOG_DEBUG)) {
nsAutoCString name;
aRequest->GetName(name);

View File

@ -55,7 +55,7 @@ PRLogModuleInfo* nsURILoader::mLog = nullptr;
#define LOG(args) MOZ_LOG(nsURILoader::mLog, PR_LOG_DEBUG, args)
#define LOG_ERROR(args) MOZ_LOG(nsURILoader::mLog, PR_LOG_ERROR, args)
#define LOG_ENABLED() PR_LOG_TEST(nsURILoader::mLog, PR_LOG_DEBUG)
#define LOG_ENABLED() MOZ_LOG_TEST(nsURILoader::mLog, PR_LOG_DEBUG)
#define NS_PREF_DISABLE_BACKGROUND_HANDLING \
"security.exthelperapp.disable_background_handling"

View File

@ -129,7 +129,7 @@ PRLogModuleInfo* nsExternalHelperAppService::mLog = nullptr;
// Using 3 instead of PR_LOG_WARN because we don't output warnings
#undef LOG
#define LOG(args) MOZ_LOG(nsExternalHelperAppService::mLog, 3, args)
#define LOG_ENABLED() PR_LOG_TEST(nsExternalHelperAppService::mLog, 3)
#define LOG_ENABLED() MOZ_LOG_TEST(nsExternalHelperAppService::mLog, 3)
static const char NEVER_ASK_FOR_SAVE_TO_DISK_PREF[] =
"browser.helperApps.neverAsk.saveToDisk";

View File

@ -40,7 +40,7 @@
using namespace mozilla;
#define LOG(args) MOZ_LOG(mLog, PR_LOG_DEBUG, args)
#define LOG_ENABLED() PR_LOG_TEST(mLog, PR_LOG_DEBUG)
#define LOG_ENABLED() MOZ_LOG_TEST(mLog, PR_LOG_DEBUG)
static nsresult
FindSemicolon(nsAString::const_iterator& aSemicolon_iter,

View File

@ -51,7 +51,7 @@ extern PRLogModuleInfo *gOfflineCacheUpdateLog;
#define LOG(args) MOZ_LOG(gOfflineCacheUpdateLog, 4, args)
#undef LOG_ENABLED
#define LOG_ENABLED() PR_LOG_TEST(gOfflineCacheUpdateLog, 4)
#define LOG_ENABLED() MOZ_LOG_TEST(gOfflineCacheUpdateLog, 4)
namespace mozilla {
namespace docshell {

Some files were not shown because too many files have changed in this diff Show More