Closed Bug 1162748 Opened 5 years ago Closed 5 years ago

Remove usage of |#ifdef PR_LOGGING| from graphics

Categories

(Core :: Graphics, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: erahm, Assigned: erahm)

References

Details

Attachments

(1 file, 1 obsolete file)

In bug 1161238 we plan on removing |--disable-logging| which makes |#ifdef PR_LOGGING| redundant.
PR_LOGGING is now always defined, we can remove #ifdefs checking for it.
Attachment #8603059 - Flags: review?(nfroyd)
Assignee: nobody → erahm
Status: NEW → ASSIGNED
Comment on attachment 8603059 [details] [diff] [review]
Remove instances of #ifdef PR_LOGGING in graphics

Review of attachment 8603059 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/2d/Logging.h
@@ -178,5 @@
>      // make the corresponding change in the ShouldOutputMessage method
>      // above.
>      if (PreferenceAccess::sGfxLogLevel >= aLevel) {
> -#if defined(WIN32) && !defined(PR_LOGGING)
> -      ::OutputDebugStringA((aNoNewline ? aString : aString+"\n").c_str());

Please also remove the declaration of OutputDebugStringA at the top of this file - this was the only use of it.
Attachment #8603059 - Flags: review?(nfroyd) → review+
Updated per Botond's request and triggered a few windows builds. Botond, does
this look good to you?
Attachment #8603422 - Flags: feedback?(botond)
Attachment #8603059 - Attachment is obsolete: true
Comment on attachment 8603422 [details] [diff] [review]
Remove instances of #ifdef PR_LOGGING in graphics

Carrying forward r+ from froydnj.
Attachment #8603422 - Flags: review+
Comment on attachment 8603422 [details] [diff] [review]
Remove instances of #ifdef PR_LOGGING in graphics

Review of attachment 8603422 [details] [diff] [review]:
-----------------------------------------------------------------

I've only glanced at the rest, but Logging.h looks good to me, thanks!

(I assume the performance implications of enabling the code that was protected by '#ifdef PR_LOGGING' unconditionally have been discussed elsewhere, so I won't comment on that.)
Attachment #8603422 - Flags: feedback?(botond) → feedback+
(In reply to Botond Ballo [:botond] [at c++ standards meeting May 4-9] from comment #7)
> (I assume the performance implications of enabling the code that was
> protected by '#ifdef PR_LOGGING' unconditionally have been discussed
> elsewhere, so I won't comment on that.)

Fun fact: PR_LOGGING has been enabled unconditionally for a while now (one has had to use --disable-logging to, well, disable it, and none of our builds do that by default).  So if nobody has complained, that's a good thing!
https://hg.mozilla.org/mozilla-central/rev/3464d56d154d
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.