Closed
Bug 78665
Opened 24 years ago
Closed 24 years ago
[console] gtk widgets must not print to console in opt builds
Categories
(Core :: XUL, defect, P4)
Core
XUL
Tracking
()
RESOLVED
FIXED
mozilla0.9.2
People
(Reporter: cls, Assigned: jtaylor)
References
Details
(Whiteboard: critical for 0.9.2)
Attachments
(7 files)
|
5.62 KB,
patch
|
Details | Diff | Splinter Review | |
|
14.37 KB,
patch
|
Details | Diff | Splinter Review | |
|
12.86 KB,
patch
|
Details | Diff | Splinter Review | |
|
13.32 KB,
patch
|
Details | Diff | Splinter Review | |
|
97.63 KB,
patch
|
Details | Diff | Splinter Review | |
|
12.63 KB,
patch
|
Details | Diff | Splinter Review | |
|
12.61 KB,
patch
|
Details | Diff | Splinter Review |
<formletter>It has been decreed (or requested at any rate) that our release
(read non-debug) builds must not print anything to the console when the app is
running. See bug 76720 for details. I have done a preliminary tree scouring
and created mini-patches for each module that has bare printfs. These patches
are not all inclusive as I didn't even think about xul/js output until post
scour so module owners & peers will still need to scour their modules themselves
as well as make sure the preliminary patches do not break anything.</formletter>
Sorry about the additional spammage but I should clear up a couple of things
before everyone starts replying.
1) I'm just the messenger. Discussions outside of the specific module/patches
should be discussed in the parent bug ( bug 76720).
2) I have no intention of checking in the patches as is; that's why the bugs are
assigned to someone else ;).
3) The patches are the result of a far & wide-reaching grep across the entire
tree. They may affect some cases that are not even used and they are far from
optimal.
4) Some platforms/ports will not need the printfs shutoff as they use other
mechanisms to stop the printfs. That's fine. Note it in the bug and close it
as invalid(?). Depending upon the platform/port some people may still be
interested in removing the overhead from the printfs.
Updated•24 years ago
|
Status: NEW → ASSIGNED
Priority: P2 → P4
Target Milestone: --- → mozilla0.9.1
Comment 3•24 years ago
|
||
Per PDT Triage effort: changing the targeted milestone to "mozilla0.9.2".
Please feel free to renominate/address bug if time is available AFTER all
currently targeted 0.9.1 bugs are resolved.
.Angela...
Target Milestone: mozilla0.9.1 → mozilla0.9.2
Comment 4•24 years ago
|
||
76720 is targetted for 0.9.1, can we move this up?
Comment 5•24 years ago
|
||
lets keep dribbling these [console] bugs into the tree as quick as we
can, but they shouldn't hold up or block 0.9.1 so moving the target milestone
to 0.9.2.
Comment 6•24 years ago
|
||
r=pavlov. gagan, give this to one of our lucky interns. a free trip for one
to printf removal camp for a week!
Assignee: pavlov → gagan
Status: ASSIGNED → NEW
Whiteboard: [intern]
| Assignee | ||
Comment 8•24 years ago
|
||
john: few comments here--
1. You have moved some of the #if 0 code to #ifdef DEBUG... I don't think that
would be very desirable-- #if 0 is completely commented out code. In some cases
switching it on may even directly hurt. So my suggestion would be to leave the
#if 0 code there.
2. Try and maintain the indentation for rest of the code as is. There are some
cases where you have removed some spaces too.
3. Make sure you do try and build this on at least one other platform.
| Assignee | ||
Comment 10•24 years ago
|
||
Comment 11•24 years ago
|
||
In file nsFilePicker.cpp, for this patch--
@@ -88,7 +92,9 @@
{
// nsFilePicker *f = (nsFilePicker*)data;
gchar *foo = (gchar*)gtk_object_get_data(GTK_OBJECT(w), "filters");
+#ifdef DEBUG
g_print("filter_item_activated(): %s\n", foo);
+#endif
}
if foo is not being used for anything else (and I suspect it is the case) then
wrap that under the DEBUG check as well. Same thing with filters (a few lines
below)
just fyi doing something like this will result in a leak!
x = something.ToNewCString()
printf(x)
So make sure a corresponding nsCRT::free(x) is there. I couldn't tell from the
patches if it was there or not.
| Assignee | ||
Comment 12•24 years ago
|
||
| Reporter | ||
Comment 13•24 years ago
|
||
Wrt attach 37987:
The cases that would wind up as | else {} | in an opt build look slightly
questionable but assuming it compiles, r=cls .
| Assignee | ||
Comment 14•24 years ago
|
||
Comment 15•24 years ago
|
||
It's really hard to see what you did in this last patch because it looks as
though the entire file was replaced. Did you replace spaces with tabs or
something? Maybe you need to attach a -w patch for review, ensure that what you
intend to check in uses spaces, not tabs.
| Assignee | ||
Comment 16•24 years ago
|
||
Comment 17•24 years ago
|
||
+#ifdef DEBUG
// nsFilePicker *f = (nsFilePicker*)data;
gchar *foo = (gchar*)gtk_object_get_data(GTK_OBJECT(w), "filters");
g_print("filter_item_activated(): %s\n", foo);
+ nsCRT::free(foo);
+#endif
Don't free that. It's a reference, not a copy.
Fix that and you have an sr=blizzard.
| Assignee | ||
Comment 18•24 years ago
|
||
Comment 19•24 years ago
|
||
r=gagan now get an approval and land it in! :)
| Assignee | ||
Comment 20•24 years ago
|
||
I got SR, submitted for approval earlier today to drivers@mozilla.org.
Status: NEW → ASSIGNED
| Assignee | ||
Comment 22•24 years ago
|
||
Fix in.
| Assignee | ||
Comment 23•24 years ago
|
||
Fix checked in, resolving.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•