Closed
Bug 117440
Opened 24 years ago
Closed 16 years ago
remove usages of DEBUG_PRINTF in favor of NS_ASSERTION/NS_WARNING
Categories
(Core :: General, defect)
Core
General
Tracking
()
RESOLVED
FIXED
mozilla1.9.3a2
People
(Reporter: Morten, Assigned: sgautherie)
References
()
Details
Attachments
(5 files, 8 obsolete files)
|
815 bytes,
patch
|
darin.moz
:
review+
alecf
:
superreview+
|
Details | Diff | Splinter Review |
|
11.66 KB,
patch
|
brendan
:
review+
brendan
:
superreview+
|
Details | Diff | Splinter Review |
|
1.63 KB,
patch
|
brendan
:
superreview+
|
Details | Diff | Splinter Review |
|
950 bytes,
patch
|
smontagu
:
review+
|
Details | Diff | Splinter Review |
|
1.30 KB,
patch
|
jst
:
review+
|
Details | Diff | Splinter Review |
Timeless asked me to do this...
not yet tested fully, but it doesn't break my optimized tree fwiw.
will do a debug build as soon as I have freed up enough space.
patch coming up in a minute...
| Reporter | ||
Updated•24 years ago
|
Status: NEW → ASSIGNED
| Reporter | ||
Comment 1•24 years ago
|
||
| Reporter | ||
Comment 2•24 years ago
|
||
With space freed, I was able to build debug build, and make the patch work.
Attachment #63072 -
Attachment is obsolete: true
| Reporter | ||
Comment 3•24 years ago
|
||
Attachment #63126 -
Attachment is obsolete: true
| Reporter | ||
Comment 4•24 years ago
|
||
Attachment #63144 -
Attachment is obsolete: true
| Reporter | ||
Comment 5•24 years ago
|
||
Attachment #63152 -
Attachment is obsolete: true
Attachment #63153 -
Flags: review+
Comment 6•24 years ago
|
||
NS_WARNING does not work like PR_LOG -- it does not take a parenthesized actual
parameter list. It takes a single string argument. So changes such as this:
+ NS_WARNING(("\n\ncharset = %s", atomToName(charset)));
do not have the effect you want -- they'll pass the final operand in a comma
expression as the single string argument.
/be
| Reporter | ||
Comment 7•24 years ago
|
||
Attachment #63153 -
Attachment is obsolete: true
Comment 8•24 years ago
|
||
I'd like jag to sr= the last patch. Do we really need to wrap nsPrintfCString
in an nsCAutoString? Maybe the kLocalBufferSize in nsPrintfCString.h is too
small; if it were bigger, we could just declare a local nsPrintfCString and pass
it to NS_WARNING, and avoid another (bigger) stack-allocated string, and the
copy into that auto-string's buffer.
/be
| Reporter | ||
Comment 9•24 years ago
|
||
I wrapped nsPrintfCString in nsCAutoString because otherwise it wouldn't compile...
I got that piece of code from jag.
IIRC, he said "use nsCAutoString(nsPrintfString(..)).get() for now"
so I suppose there might be a better solution.
Comment 10•24 years ago
|
||
I advised wrapping the result of nsPrintfCString in a nsCAutoString so he could
use .get(). With this patch one can call .get() on a nsPrintfCString directly.
Comment 11•24 years ago
|
||
Right, what Morten said (no conflicts when submitting comments from patch manager).
Comment 12•24 years ago
|
||
Comment on attachment 64080 [details] [diff] [review]
Make nsPrintfCString inherit from nsAFlatCString
[Checkin: Comment 42]
sr=alecf
Attachment #64080 -
Flags: superreview+
| Reporter | ||
Comment 13•24 years ago
|
||
Attachment #63482 -
Attachment is obsolete: true
Comment 14•24 years ago
|
||
Comment on attachment 64080 [details] [diff] [review]
Make nsPrintfCString inherit from nsAFlatCString
[Checkin: Comment 42]
r/sr=darin
Attachment #64080 -
Flags: review+
Comment 15•24 years ago
|
||
Comment on attachment 64085 [details] [diff] [review]
remove nsCAutoString wrapping
[Checkin: See comment 21=44]
>@@ -136,7 +134,7 @@
> const char* registryLocation, \
> const nsModuleComponentInfo *info) \
> { \
>- UCONV_DEBUG_PRINTF("UnRegSelf " _From " to " _To "converter not implement\n"); \
>+ NS_WARNING("UnRegSelf " _From " to " _To "converter not implement\n"); \
> return NS_OK; \
> }
"not implemented\n" for proper English -- and why isn't this returning
NS_ERROR_NOT_IMPLEMENTED rather than NS_OK?
Fix those two things and sr=brendan@mozilla.org. I recorded timeless's r=,
which carries over.
/be
Attachment #64085 -
Flags: superreview+
Attachment #64085 -
Flags: review+
| Reporter | ||
Comment 16•24 years ago
|
||
this patch replaces part of attachment 64058 [details] [diff] [review], but not all of it.
this patch also removes unneeded \'s from most of the lines...
| Reporter | ||
Comment 17•24 years ago
|
||
bah... seems atleast some \'s where actually needed... investigating them
| Reporter | ||
Comment 18•24 years ago
|
||
Attachment #64095 -
Attachment is obsolete: true
| Reporter | ||
Updated•24 years ago
|
Attachment #64096 -
Attachment is obsolete: true
| Reporter | ||
Comment 19•24 years ago
|
||
Comment 20•24 years ago
|
||
Comment on attachment 64097 [details] [diff] [review]
final patch to nsICharsetConverterManager.h
[Checkin: Comment 21=43]
sr=brendan@mozilla.org
Attachment #64097 -
Flags: superreview+
Comment 21•24 years ago
|
||
Attachments 64085/64097 checked in.
| Reporter | ||
Comment 22•24 years ago
|
||
allrighty then
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Updated•24 years ago
|
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 23•24 years ago
|
||
These used to be off by default and could be turned on if needed.
Now these warnings are firing all the time in debug builds and there is no way
to enable them in a non-debug build.
Comment 24•24 years ago
|
||
I'm curious why I was not included in the bug from the beginning.
Comment 25•24 years ago
|
||
or Shanjian or Roland since this is the area we work in every day.
Comment 26•24 years ago
|
||
One of the problems that the developers that work on font bugs face is that
the font setup varies wildly from system. The font code tries a variety of
thing to get the best fonts so its behavior is fairly complex. To debug
problems a developer needs more info than just "it does not look good"
consider bug 128338: Incorrect fonts used for certain "lang=" attributes
> When setting NS_FONT_DEBUG=3 and loading the page in the URL
> field I get the output below. ...
> As far as I can tell from looking at the relevant standards
> both "no", "no-bokmal" and "nb" should be correct identifiers
> for the same language.
>
>
> GetFontNames -adobe-courier-*-*-*-*-*-*-*-*-*-*-iso8859-1
> loaded -adobe-courier-medium-r-normal--12-120-75-75-m-70-iso8859-1
> FindFont(0061)[monospace, ]
> returns -adobe-courier-medium-r-normal--12-120-75-75-m-70-iso8859-1
> GetFontNames -*-*-*-*-*-*-*-*-*-*-*-*-cns11643.1986-2
> GetFontNames -*-*-*-*-*-*-*-*-*-*-*-*-cns11643.1992.2-0
Without information about what fonts are being considered how would a
developer tell what was happening? Withoug knowing the details of what is
happening it is hard to fix bugs like this.
Is the plan that to fix font bugs the developer will always need to make
and post a debug build so the diagnostics will be available?
Won't requiring custom build make the task of debugging much more difficult
and far slower as well as possibly introduce compilcations from new bugs?
Comment 27•24 years ago
|
||
Yeah, I'm with Brian: this is a job for PR_LOG, forced on in release builds (and
used sparingly in performance-critical paths!).
Comment 28•24 years ago
|
||
Since this patch broke the existing working code (it now reports when it is not
wanted and cannot report when it is needed) can those who put this patch in
at least fix those parts and explaing how their fix will be used/controlled?
Comment 29•24 years ago
|
||
I am distressed by the lack of comment or "commitment to make working code" by
those who put in this patch. Nobody's mother works here. We all need to clean
up after ourselves.
I am also still waiting to hear comment on why the people that regularily work
in this code were not contacted before this patch was put in.
Perhaps we should just back out this work.
Comment 30•24 years ago
|
||
bstell, sorry for not ensuring you got to r= -- this looked like pan-module
cleanup, and I blew it. We've had problems with mailnews guys not being
apprised of pan-module cleanups touching their code, and not having a crack at
r= -- this has led to super-review angst, admonishment, and advice for a better
tomorrow -- tree-wide patches should be broken up by module, so that each module
owner or peer can r= using the patch manager.
Sorry again, do what you need to do to fix it right. PR_LOG forced on sounds
good to me too.
/be
Comment 31•24 years ago
|
||
Brendan: Thank you for responding. I am glad to see some discussion of the
basic communication issue.
I do not feel any need to r= everything that gets done in this area. I am
in fact glad to see other working on trying to improve it. No one of us can
do it all.
My concern is that by failing to include those that work in an area it is all
too easy to misunderstand what the code is doing. Without knowing what the
code is doing it is very hard not to break it even if unintentionally.
With a very little bit of input at an early stage this would probably be
working code instead of broken code.
I am not especially concerned with the exact implementation of this code
but the feature it provides is there to help with maintenance and it weakens
the product to lose it. I am very open to an alternate implementations that
provide similar maintenance utility.
I am, however, very sensitive to having clean up code broken by others as this
was a major problem for the i18n department in the NS4x days. We worked very
hard to get out of this mode. Last time I left Netscape this was a major reason.
Comment 32•24 years ago
|
||
At this point I would like to hear the people who made the change step
forward and discuss how they will rectify this situation.
| Reporter | ||
Comment 33•24 years ago
|
||
I'm sorry if my patcch here stepped on anybody's toes, but I did it because
timeless wanted me to... I'm quite new to mozilla hacking, and timeless gave me
this little task as a nice easy thing to do...
If the consent is that this patch ruins the day, it's fine by me if it's backed
out, or at least two of the patches... the third one should stay in (attachment
64080 [details] [diff] [review])
Comment 34•24 years ago
|
||
Morten: I'm not especially concerned that you might have stepped on my
toes. Its no problem. In team activities everyone ends up stepping on others
toes every now and then. I certianly have stepped on others toes.
I am okay with someone going forward to make this work using PR_LOG.
I am okay with someone backing out the code (less the indicated bit) to make
it work like it used to.
How can we get to the point of working code (and "All's well that ends well")?
Comment 35•24 years ago
|
||
Morten: are you going to fix this?
| Reporter | ||
Comment 36•24 years ago
|
||
Sorry if I didn't make clear on this, but I'm all out of time to do anything
mozilla-wise...
Somebody else would need to do this. Sorry.
Comment 37•24 years ago
|
||
bstell:
I can take this one... I only need a description what I should fix... :)
Comment 38•24 years ago
|
||
Roland:
Do to a misunderstanding of their purpose some of the NS_FONT_DEBUG
statements were converted to assertions. This means that for debug
builds they report when they should not and for optimized builds
they cannot report when we want to find out what the font subsystem
is doing on a user's system.
One possible solution would be to simply backout the changes.
Another possible solution would be to use PR_LOG. Of course we
would still want to have the messages not report during debug and
be able to be turned on in a user's sytem.
| Reporter | ||
Comment 39•24 years ago
|
||
reassigning bug to Roland since he has expressed a wish to take this.
Assignee: Morten → Roland.Mainz
Status: REOPENED → NEW
| Reporter | ||
Comment 40•22 years ago
|
||
I'm looking over my old bugs (still not able to work on this myself)
should this bug be closed or reassigned to nobody@mozilla.org?
Updated•21 years ago
|
Product: Browser → Seamonkey
Comment 41•19 years ago
|
||
(In reply to comment #34)
> ...
> I am okay with someone going forward to make this work using PR_LOG.
>
> I am okay with someone backing out the code (less the indicated bit) to make
> it work like it used to.
I don't see a comment, but it does appear this was backed out. Please comment if I am incorrect.
Assignee: roland.mainz → nobody
QA Contact: granrosebugs → build-config
| Assignee | ||
Comment 42•17 years ago
|
||
Comment on attachment 64080 [details] [diff] [review]
Make nsPrintfCString inherit from nsAFlatCString
[Checkin: Comment 42]
Landed:
http://bonsai.mozilla.org/cvslog.cgi?file=mozilla/xpcom/string/public/nsPrintfCString.h&rev=MOZILLA_1_8_BRANCH&mark=1.7
Then was superseded:
http://bonsai.mozilla.org/cvslog.cgi?file=mozilla/xpcom/string/public/nsPrintfCString.h&rev=MOZILLA_1_8_BRANCH&mark=1.11
Attachment #64080 -
Attachment description: Make nsPrintfCString inherit from nsAFlatCString → Make nsPrintfCString inherit from nsAFlatCString
[Checkin: Comment 42]
| Assignee | ||
Comment 43•17 years ago
|
||
Comment on attachment 64097 [details] [diff] [review]
final patch to nsICharsetConverterManager.h
[Checkin: Comment 21=43]
Landed:
http://bonsai.mozilla.org/cvslog.cgi?file=mozilla/intl/uconv/public/nsICharsetConverterManager.h&mark=1.30
Then was superseded:
http://bonsai.mozilla.org/cvslog.cgi?file=mozilla/intl/uconv/public/nsICharsetConverterManager.h&mark=1.31
Attachment #64097 -
Attachment description: final patch to nsICharsetConverterManager.h → final patch to nsICharsetConverterManager.h
[Checkin: Comment 21=43]
| Assignee | ||
Comment 44•17 years ago
|
||
Comment on attachment 64085 [details] [diff] [review]
remove nsCAutoString wrapping
[Checkin: See comment 21=44]
Landed:
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=MozillaTinderboxAll&branch=HEAD&branchtype=match&sortby=Date&hours=2&date=explicit&mindate=2002-01-09+10%3A49&maxdate=2002-01-09+10%3A49
(without nsICharsetConverterManager.h part)
Attachment #64085 -
Attachment description: remove nsCAutoString wrapping → remove nsCAutoString wrapping
[Checkin: See comment 21=44]
| Assignee | ||
Comment 45•17 years ago
|
||
(In reply to comment #41)
> I don't see a comment, but it does appear this was backed out. Please comment
> if I am incorrect.
No backout. Yet the files affected by the 2 patches which "should have been" were all removed since.
Thus if any of this code was moved to some other/new files, then too bad.
Severity: normal → minor
Component: Build Config → General
Flags: in-testsuite-
Product: SeaMonkey → Core
QA Contact: build-config → general
Target Milestone: --- → mozilla1.9.2a1
| Assignee | ||
Comment 46•17 years ago
|
||
Assignee: nobody → sgautherie.bz
Status: NEW → ASSIGNED
Attachment #374003 -
Flags: review?(smontagu)
Updated•17 years ago
|
Attachment #374003 -
Flags: review?(smontagu) → review+
| Assignee | ||
Comment 47•17 years ago
|
||
Comment on attachment 374003 [details] [diff] [review]
(Dv1) <nsCompressedCharMap.cpp> remove commented out FONT_SCAN_PRINTF()
[Checkin: Comment 47]
http://hg.mozilla.org/mozilla-central/rev/e883a4efa220
Attachment #374003 -
Attachment description: (Dv1) <nsCompressedCharMap.cpp> remove commented out FONT_SCAN_PRINTF() → (Dv1) <nsCompressedCharMap.cpp> remove commented out FONT_SCAN_PRINTF()
[Checkin: Comment 47]
| Assignee | ||
Comment 48•17 years ago
|
||
jst, ftr, you checked this in in
http://bonsai.mozilla.org/cvslog.cgi?file=mozilla/js/src/xpconnect/src/xpcwrappednativescope.cpp&rev=1.10
Attachment #374212 -
Flags: superreview?(jst)
Attachment #374212 -
Flags: review?(jst)
| Assignee | ||
Comment 49•17 years ago
|
||
Comment on attachment 374212 [details] [diff] [review]
(Ev1) <xpcwrappednativescope.cpp> remove unused |#ifdef + NS_WARNING()| case
[Checkin: Comment 50]
Looking for any review(er)...
Attachment #374212 -
Flags: superreview?(jst) → review?(shaver)
Updated•16 years ago
|
Attachment #374212 -
Flags: review?(shaver)
Attachment #374212 -
Flags: review?(jst)
Attachment #374212 -
Flags: review+
| Assignee | ||
Comment 50•16 years ago
|
||
Comment on attachment 374212 [details] [diff] [review]
(Ev1) <xpcwrappednativescope.cpp> remove unused |#ifdef + NS_WARNING()| case
[Checkin: Comment 50]
http://hg.mozilla.org/mozilla-central/rev/65f84c853781
Attachment #374212 -
Attachment description: (Ev1) <xpcwrappednativescope.cpp> remove unused |#ifdef + NS_WARNING()| case → (Ev1) <xpcwrappednativescope.cpp> remove unused |#ifdef + NS_WARNING()| case
[Checkin: Comment 50]
Attachment #374212 -
Flags: review+
| Assignee | ||
Updated•16 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 24 years ago → 16 years ago
Resolution: --- → FIXED
Target Milestone: mozilla1.9.2a1 → mozilla1.9.3a2
You need to log in
before you can comment on or make changes to this bug.
Description
•