Closed
Bug 75796
Opened 24 years ago
Closed 14 years ago
new leak per url load tool
Categories
(Core :: XPCOM, enhancement)
Core
XPCOM
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: thesteve, Unassigned)
References
Details
Attachments
(7 files)
2.46 KB,
text/plain
|
Details | |
3.82 KB,
patch
|
Details | Diff | Splinter Review | |
3.14 KB,
patch
|
Details | Diff | Splinter Review | |
3.14 KB,
patch
|
Details | Diff | Splinter Review | |
2.84 KB,
text/plain
|
Details | |
3.61 KB,
image/png
|
Details | |
4.10 KB,
image/png
|
Details |
I have a patch to source for mozilla, which generates one large file, which
contains leak information. The file consists of a header, which is the name of
the url that is loaded, followed by the leaks associated with that url.
![]() |
||
Comment 1•24 years ago
|
||
Steve, would you care to attach a diff to this bug using
http://bugzilla.mozilla.org/createattachment.cgi?id=75796 ?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Reporter | ||
Comment 2•24 years ago
|
||
Reporter | ||
Comment 3•24 years ago
|
||
The first basic question, is how do we want to implement the interface to this
functionality? In other words, should we implement it as:
1) some conditional inclusion build-time macro constant
2) a pref
3) part of the debug build
4) dependent on some environment variable
5) other, or some combination (perhaps, a pref on the debug build)
Reporter | ||
Comment 4•24 years ago
|
||
Concensus so far:
1) not part of debug build
2) only as part of boehm build
3) the rest (how to switch the functionality on or off) doesn't seem to matter
much to people.
Reporter | ||
Comment 5•24 years ago
|
||
Reporter | ||
Comment 6•24 years ago
|
||
Comment 7•24 years ago
|
||
You don't need to initialize an |nsCOMPtr| to |NULL|. It does so by itself.
Cool C++-kitties prefer |0| over |NULL| or |nsnull| in any case. Don't compare
with |NULL| or |0|, just test, e.g., prefer
if ( foo )
over
if ( foo != NULL )
...and as I mention above, prefer |0| (in general) or else |nsnull| (in mozilla)
over |NULL|.
Declare your variables right where you can first initialize them (where that is
compatible with the desired lifetime), so in your code you would move the
declaration of |currURI| into the |if (result)| clause, and the declaration of
|urlName| to inside the |if (currURI)| clause.
We have a general portability rule about not conditionally |#include|ing files
http://www.mozilla.org/hacking/portable-cpp.html#dont_ifdef_include
This debugging case isn't explicitly mentioned as an exception, but I think it
should be, so you probably shouldn't be dissuaded from this if it comes up.
I think you'll want to double-check your auto-conf stuff with Chris Seawood, but
other than that, it looks good to me. Fix the declarations and tests and you'll
have my sr.
Comment 8•24 years ago
|
||
Oops. We crossed the streams :-) My review above refers to your second patch
http://bugzilla.mozilla.org/showattachment.cgi?attach_id=35197
and I see you have addressed some of the concerns (notably that you don't need
to init an |nsCOMPtr| to |NULL|). The declaration and test comments still
apply, I think.
Reporter | ||
Comment 9•24 years ago
|
||
Reporter | ||
Comment 10•24 years ago
|
||
Reporter | ||
Comment 11•24 years ago
|
||
Reporter | ||
Comment 12•24 years ago
|
||
Comment 13•24 years ago
|
||
Spontaneous review!
Please remove the #ifdef(linux) from all of the defines and move it into the
configure test instead, assuming that it has to be linux. Having more than one
define for the option makes it hard to get running on other platforms and
increases the fragility and maintenance down the road.
Probably there's no need to limit it further than GC_LEAK_DETECTOR, since people
will use GC_LEAK_DETECTOR where it works and won't where it doesn't work
(because it won't work :-). I would think this code ought to work on Mac, right?
Updated•19 years ago
|
Assignee: thesteve → nobody
QA Contact: scc → xpcom
Comment 15•19 years ago
|
||
Shouldn't bugs like this one have patch and perf keywords?
Comment 16•14 years ago
|
||
I believe that we have an equivalent of this now, and it is no longer useful code.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•