Skip to content

Commit 141e0ff

Browse files
committed
Bug 1165515 - Part 3: Convert PR_LOG_TEST to MOZ_LOG_TEST. r=froydnj
1 parent ef4c505 commit 141e0ff

File tree

114 files changed

+235
-235
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+235
-235
lines changed

docshell/base/nsDocShell.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1418,7 +1418,7 @@ nsDocShell::LoadURI(nsIURI* aURI,
14181418
}
14191419

14201420
#if defined(DEBUG)
1421-
if (PR_LOG_TEST(gDocShellLog, PR_LOG_DEBUG)) {
1421+
if (MOZ_LOG_TEST(gDocShellLog, PR_LOG_DEBUG)) {
14221422
nsAutoCString uristr;
14231423
aURI->GetAsciiSpec(uristr);
14241424
MOZ_LOG(gDocShellLog, PR_LOG_DEBUG,
@@ -1980,7 +1980,7 @@ bool
19801980
nsDocShell::SetCurrentURI(nsIURI* aURI, nsIRequest* aRequest,
19811981
bool aFireOnLocationChange, uint32_t aLocationFlags)
19821982
{
1983-
if (gDocShellLeakLog && PR_LOG_TEST(gDocShellLeakLog, PR_LOG_DEBUG)) {
1983+
if (gDocShellLeakLog && MOZ_LOG_TEST(gDocShellLeakLog, PR_LOG_DEBUG)) {
19841984
nsAutoCString spec;
19851985
if (aURI) {
19861986
aURI->GetSpec(spec);
@@ -5302,7 +5302,7 @@ nsDocShell::LoadErrorPage(nsIURI* aURI, const char16_t* aURL,
53025302
nsIChannel* aFailedChannel)
53035303
{
53045304
#if defined(DEBUG)
5305-
if (PR_LOG_TEST(gDocShellLog, PR_LOG_DEBUG)) {
5305+
if (MOZ_LOG_TEST(gDocShellLog, PR_LOG_DEBUG)) {
53065306
nsAutoCString spec;
53075307
aURI->GetSpec(spec);
53085308

@@ -9606,7 +9606,7 @@ nsDocShell::InternalLoad(nsIURI* aURI,
96069606
nsresult rv = NS_OK;
96079607
mOriginalUriString.Truncate();
96089608

9609-
if (gDocShellLeakLog && PR_LOG_TEST(gDocShellLeakLog, PR_LOG_DEBUG)) {
9609+
if (gDocShellLeakLog && MOZ_LOG_TEST(gDocShellLeakLog, PR_LOG_DEBUG)) {
96109610
nsAutoCString spec;
96119611
if (aURI) {
96129612
aURI->GetSpec(spec);
@@ -11165,7 +11165,7 @@ nsDocShell::OnNewURI(nsIURI* aURI, nsIChannel* aChannel, nsISupports* aOwner,
1116511165
NS_PRECONDITION(!aChannel || !aOwner, "Shouldn't have both set");
1116611166

1116711167
#if defined(DEBUG)
11168-
if (PR_LOG_TEST(gDocShellLog, PR_LOG_DEBUG)) {
11168+
if (MOZ_LOG_TEST(gDocShellLog, PR_LOG_DEBUG)) {
1116911169
nsAutoCString spec;
1117011170
aURI->GetSpec(spec);
1117111171

@@ -11785,7 +11785,7 @@ nsDocShell::AddToSessionHistory(nsIURI* aURI, nsIChannel* aChannel,
1178511785
NS_PRECONDITION(!aChannel || !aOwner, "Shouldn't have both set");
1178611786

1178711787
#if defined(DEBUG)
11788-
if (PR_LOG_TEST(gDocShellLog, PR_LOG_DEBUG)) {
11788+
if (MOZ_LOG_TEST(gDocShellLog, PR_LOG_DEBUG)) {
1178911789
nsAutoCString spec;
1179011790
aURI->GetSpec(spec);
1179111791

docshell/shistory/nsSHistory.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ GetSHistoryLog()
7878
//
7979
#define LOG_SPEC(format, uri) \
8080
PR_BEGIN_MACRO \
81-
if (PR_LOG_TEST(GetSHistoryLog(), PR_LOG_DEBUG)) { \
81+
if (MOZ_LOG_TEST(GetSHistoryLog(), PR_LOG_DEBUG)) { \
8282
nsAutoCString _specStr(NS_LITERAL_CSTRING("(null)"));\
8383
if (uri) { \
8484
uri->GetSpec(_specStr); \
@@ -96,7 +96,7 @@ GetSHistoryLog()
9696
//
9797
#define LOG_SHENTRY_SPEC(format, shentry) \
9898
PR_BEGIN_MACRO \
99-
if (PR_LOG_TEST(GetSHistoryLog(), PR_LOG_DEBUG)) { \
99+
if (MOZ_LOG_TEST(GetSHistoryLog(), PR_LOG_DEBUG)) { \
100100
nsCOMPtr<nsIURI> uri; \
101101
shentry->GetURI(getter_AddRefs(uri)); \
102102
LOG_SPEC(format, uri); \

dom/base/nsContentPolicy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ nsContentPolicy::CheckPolicy(CPMethod policyMethod,
188188
#define LOG_CHECK(logType) \
189189
PR_BEGIN_MACRO \
190190
/* skip all this nonsense if the call failed or logging is disabled */ \
191-
if (NS_SUCCEEDED(rv) && PR_LOG_TEST(gConPolLog, PR_LOG_DEBUG)) { \
191+
if (NS_SUCCEEDED(rv) && MOZ_LOG_TEST(gConPolLog, PR_LOG_DEBUG)) { \
192192
const char *resultName; \
193193
if (decision) { \
194194
resultName = NS_CP_ResponseName(*decision); \

dom/base/nsDocument.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2305,7 +2305,7 @@ nsDocument::ResetToURI(nsIURI *aURI, nsILoadGroup *aLoadGroup,
23052305
{
23062306
NS_PRECONDITION(aURI, "Null URI passed to ResetToURI");
23072307

2308-
if (gDocumentLeakPRLog && PR_LOG_TEST(gDocumentLeakPRLog, PR_LOG_DEBUG)) {
2308+
if (gDocumentLeakPRLog && MOZ_LOG_TEST(gDocumentLeakPRLog, PR_LOG_DEBUG)) {
23092309
nsAutoCString spec;
23102310
aURI->GetSpec(spec);
23112311
PR_LogPrint("DOCUMENT %p ResetToURI %s", this, spec.get());
@@ -2638,7 +2638,7 @@ nsDocument::StartDocumentLoad(const char* aCommand, nsIChannel* aChannel,
26382638
nsIStreamListener **aDocListener,
26392639
bool aReset, nsIContentSink* aSink)
26402640
{
2641-
if (gDocumentLeakPRLog && PR_LOG_TEST(gDocumentLeakPRLog, PR_LOG_DEBUG)) {
2641+
if (gDocumentLeakPRLog && MOZ_LOG_TEST(gDocumentLeakPRLog, PR_LOG_DEBUG)) {
26422642
nsCOMPtr<nsIURI> uri;
26432643
aChannel->GetURI(getter_AddRefs(uri));
26442644
nsAutoCString spec;
@@ -2866,7 +2866,7 @@ nsDocument::InitCSP(nsIChannel* aChannel)
28662866
!applyLoopCSP &&
28672867
cspHeaderValue.IsEmpty() &&
28682868
cspROHeaderValue.IsEmpty()) {
2869-
if (PR_LOG_TEST(gCspPRLog, PR_LOG_DEBUG)) {
2869+
if (MOZ_LOG_TEST(gCspPRLog, PR_LOG_DEBUG)) {
28702870
nsCOMPtr<nsIURI> chanURI;
28712871
aChannel->GetURI(getter_AddRefs(chanURI));
28722872
nsAutoCString aspec;

dom/base/nsFocusManager.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ PRLogModuleInfo* gFocusNavigationLog;
8181
#define LOGFOCUSNAVIGATION(args) MOZ_LOG(gFocusNavigationLog, PR_LOG_DEBUG, args)
8282

8383
#define LOGTAG(log, format, content) \
84-
if (PR_LOG_TEST(log, PR_LOG_DEBUG)) { \
84+
if (MOZ_LOG_TEST(log, PR_LOG_DEBUG)) { \
8585
nsAutoCString tag(NS_LITERAL_CSTRING("(none)")); \
8686
if (content) { \
8787
content->NodeInfo()->NameAtom()->ToUTF8String(tag); \
@@ -482,7 +482,7 @@ nsFocusManager::MoveFocus(nsIDOMWindow* aWindow, nsIDOMElement* aStartElement,
482482

483483
LOGFOCUS(("<<MoveFocus begin Type: %d Flags: %x>>", aType, aFlags));
484484

485-
if (PR_LOG_TEST(gFocusLog, PR_LOG_DEBUG) && mFocusedWindow) {
485+
if (MOZ_LOG_TEST(gFocusLog, PR_LOG_DEBUG) && mFocusedWindow) {
486486
nsIDocument* doc = mFocusedWindow->GetExtantDoc();
487487
if (doc && doc->GetDocumentURI()) {
488488
nsAutoCString spec;
@@ -638,7 +638,7 @@ nsFocusManager::WindowRaised(nsIDOMWindow* aWindow)
638638
nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(aWindow);
639639
NS_ENSURE_TRUE(window && window->IsOuterWindow(), NS_ERROR_INVALID_ARG);
640640

641-
if (PR_LOG_TEST(gFocusLog, PR_LOG_DEBUG)) {
641+
if (MOZ_LOG_TEST(gFocusLog, PR_LOG_DEBUG)) {
642642
LOGFOCUS(("Window %p Raised [Currently: %p %p]", aWindow, mActiveWindow.get(), mFocusedWindow.get()));
643643
nsAutoCString spec;
644644
nsIDocument* doc = window->GetExtantDoc();
@@ -734,7 +734,7 @@ nsFocusManager::WindowLowered(nsIDOMWindow* aWindow)
734734
nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(aWindow);
735735
NS_ENSURE_TRUE(window && window->IsOuterWindow(), NS_ERROR_INVALID_ARG);
736736

737-
if (PR_LOG_TEST(gFocusLog, PR_LOG_DEBUG)) {
737+
if (MOZ_LOG_TEST(gFocusLog, PR_LOG_DEBUG)) {
738738
LOGFOCUS(("Window %p Lowered [Currently: %p %p]", aWindow, mActiveWindow.get(), mFocusedWindow.get()));
739739
nsAutoCString spec;
740740
nsIDocument* doc = window->GetExtantDoc();
@@ -852,7 +852,7 @@ nsFocusManager::WindowShown(nsIDOMWindow* aWindow, bool aNeedsFocus)
852852

853853
window = window->GetOuterWindow();
854854

855-
if (PR_LOG_TEST(gFocusLog, PR_LOG_DEBUG)) {
855+
if (MOZ_LOG_TEST(gFocusLog, PR_LOG_DEBUG)) {
856856
LOGFOCUS(("Window %p Shown [Currently: %p %p]", window.get(), mActiveWindow.get(), mFocusedWindow.get()));
857857
nsAutoCString spec;
858858
nsIDocument* doc = window->GetExtantDoc();
@@ -907,7 +907,7 @@ nsFocusManager::WindowHidden(nsIDOMWindow* aWindow)
907907

908908
window = window->GetOuterWindow();
909909

910-
if (PR_LOG_TEST(gFocusLog, PR_LOG_DEBUG)) {
910+
if (MOZ_LOG_TEST(gFocusLog, PR_LOG_DEBUG)) {
911911
LOGFOCUS(("Window %p Hidden [Currently: %p %p]", window.get(), mActiveWindow.get(), mFocusedWindow.get()));
912912
nsAutoCString spec;
913913
nsIDocument* doc = window->GetExtantDoc();
@@ -1777,7 +1777,7 @@ nsFocusManager::Focus(nsPIDOMWindow* aWindow,
17771777

17781778
LOGCONTENT("Element %s has been focused", aContent);
17791779

1780-
if (PR_LOG_TEST(gFocusLog, PR_LOG_DEBUG)) {
1780+
if (MOZ_LOG_TEST(gFocusLog, PR_LOG_DEBUG)) {
17811781
nsIDocument* docm = aWindow->GetExtantDoc();
17821782
if (docm) {
17831783
LOGCONTENT(" from %s", docm->GetRootElement());

dom/base/nsGlobalWindow.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2804,7 +2804,7 @@ nsGlobalWindow::InnerSetNewDocument(JSContext* aCx, nsIDocument* aDocument)
28042804
NS_PRECONDITION(IsInnerWindow(), "Must only be called on inner windows");
28052805
MOZ_ASSERT(aDocument);
28062806

2807-
if (gDOMLeakPRLog && PR_LOG_TEST(gDOMLeakPRLog, PR_LOG_DEBUG)) {
2807+
if (gDOMLeakPRLog && MOZ_LOG_TEST(gDOMLeakPRLog, PR_LOG_DEBUG)) {
28082808
nsIURI *uri = aDocument->GetDocumentURI();
28092809
nsAutoCString spec;
28102810
if (uri)
@@ -10558,7 +10558,7 @@ nsGlobalWindow::GetSessionStorage(ErrorResult& aError)
1055810558
}
1055910559

1056010560
if (mSessionStorage) {
10561-
if (PR_LOG_TEST(gDOMLeakPRLog, PR_LOG_DEBUG)) {
10561+
if (MOZ_LOG_TEST(gDOMLeakPRLog, PR_LOG_DEBUG)) {
1056210562
PR_LogPrint("nsGlobalWindow %p has %p sessionStorage", this, mSessionStorage.get());
1056310563
}
1056410564
bool canAccess = mSessionStorage->CanAccess(principal);
@@ -10609,7 +10609,7 @@ nsGlobalWindow::GetSessionStorage(ErrorResult& aError)
1060910609
mSessionStorage = static_cast<DOMStorage*>(storage.get());
1061010610
MOZ_ASSERT(mSessionStorage);
1061110611

10612-
if (PR_LOG_TEST(gDOMLeakPRLog, PR_LOG_DEBUG)) {
10612+
if (MOZ_LOG_TEST(gDOMLeakPRLog, PR_LOG_DEBUG)) {
1061310613
PR_LogPrint("nsGlobalWindow %p tried to get a new sessionStorage %p", this, mSessionStorage.get());
1061410614
}
1061510615

@@ -10619,7 +10619,7 @@ nsGlobalWindow::GetSessionStorage(ErrorResult& aError)
1061910619
}
1062010620
}
1062110621

10622-
if (PR_LOG_TEST(gDOMLeakPRLog, PR_LOG_DEBUG)) {
10622+
if (MOZ_LOG_TEST(gDOMLeakPRLog, PR_LOG_DEBUG)) {
1062310623
PR_LogPrint("nsGlobalWindow %p returns %p sessionStorage", this, mSessionStorage.get());
1062410624
}
1062510625

@@ -11537,7 +11537,7 @@ nsGlobalWindow::Observe(nsISupports* aSubject, const char* aTopic,
1153711537
return NS_OK;
1153811538
}
1153911539

11540-
if (PR_LOG_TEST(gDOMLeakPRLog, PR_LOG_DEBUG)) {
11540+
if (MOZ_LOG_TEST(gDOMLeakPRLog, PR_LOG_DEBUG)) {
1154111541
PR_LogPrint("nsGlobalWindow %p with sessionStorage %p passing event from %p",
1154211542
this, mSessionStorage.get(), changingStorage.get());
1154311543
}

dom/base/nsObjectLoadingContent.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ GetObjectLog()
117117
}
118118

119119
#define LOG(args) MOZ_LOG(GetObjectLog(), PR_LOG_DEBUG, args)
120-
#define LOG_ENABLED() PR_LOG_TEST(GetObjectLog(), PR_LOG_DEBUG)
120+
#define LOG_ENABLED() MOZ_LOG_TEST(GetObjectLog(), PR_LOG_DEBUG)
121121

122122
static bool
123123
IsJavaMIME(const nsACString & aMIMEType)

dom/events/IMEStateManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ IMEStateManager::OnMouseButtonEventInEditor(nsPresContext* aPresContext,
506506
bool consumed =
507507
sActiveIMEContentObserver->OnMouseButtonEvent(aPresContext, internalEvent);
508508

509-
if (PR_LOG_TEST(sISMLog, PR_LOG_ALWAYS)) {
509+
if (MOZ_LOG_TEST(sISMLog, PR_LOG_ALWAYS)) {
510510
nsAutoString eventType;
511511
aMouseEvent->GetType(eventType);
512512
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,

dom/indexedDB/ProfilerHelpers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ LoggingHelper(bool aUseProfiler, const char* aFmt, ...)
284284

285285
static const PRLogModuleLevel logLevel = PR_LOG_WARNING;
286286

287-
if (PR_LOG_TEST(logModule, logLevel) ||
287+
if (MOZ_LOG_TEST(logModule, logLevel) ||
288288
(aUseProfiler && profiler_is_active())) {
289289
nsAutoCString message;
290290

dom/media/AudioStream.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ AudioStream::Write(const AudioDataValue* aBuf, uint32_t aFrames, TimeStamp *aTim
612612
uint32_t bytesToCopy = FramesToBytes(aFrames);
613613

614614
// XXX this will need to change if we want to enable this on-the-fly!
615-
if (PR_LOG_TEST(GetLatencyLog(), PR_LOG_DEBUG)) {
615+
if (MOZ_LOG_TEST(GetLatencyLog(), PR_LOG_DEBUG)) {
616616
// Record the position and time this data was inserted
617617
int64_t timeMs;
618618
if (aTime && !aTime->IsNull()) {
@@ -1133,7 +1133,7 @@ AudioStream::DataCallback(void* aBuffer, long aFrames)
11331133

11341134
WriteDumpFile(mDumpFile, this, aFrames, aBuffer);
11351135
// Don't log if we're not interested or if the stream is inactive
1136-
if (PR_LOG_TEST(GetLatencyLog(), PR_LOG_DEBUG) &&
1136+
if (MOZ_LOG_TEST(GetLatencyLog(), PR_LOG_DEBUG) &&
11371137
mState != SHUTDOWN &&
11381138
insertTime != INT64_MAX && servicedFrames > underrunFrames) {
11391139
uint32_t latency = UINT32_MAX;

0 commit comments

Comments
 (0)