Closed
Bug 573209
Opened 14 years ago
Closed 14 years ago
nsDisplayListBuilder should not be NS_STACK_CLASS
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
People
(Reporter: jruderman, Assigned: jruderman)
Details
Attachments
(1 file)
4.25 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
nsDisplayListBuilder is NS_STACK_CLASS http://hg.mozilla.org/mozilla-central/annotate/5f3f36fe8d76/layout/base/nsDisplayList.h#l121 RangePaintInfo has a nsDisplayListBuilder member http://hg.mozilla.org/mozilla-central/annotate/5f3f36fe8d76/layout/base/nsPresShell.cpp#l242 RangePaintInfo is heap-allocated http://hg.mozilla.org/mozilla-central/annotate/5f3f36fe8d76/layout/base/nsPresShell.cpp#l5506 Dunno how bad this is. Curious why static analysis didn't prevent this. Noticed it while trying to track down a leak.
Comment 1•14 years ago
|
||
Static analysis didn't prevent this because we haven't had a static analysis build running in many months. Ehren is working on resurrecting them as part of the regular debug builds. nsDisplayListBuilder was NS_STACK_CLASS because at the time I checked it was only heap-allocated and that helped with XPCOMGC. Since XPCOMGC is dead, assuming that the automatic allocation is intentional we should just remove the NS_STACK_CLASS annotation.
Assignee | ||
Comment 2•14 years ago
|
||
I guess I'll also remove the private operator new that prevented direct heap instantiation (added by bz in bug 324969).
Assignee | ||
Updated•14 years ago
|
Summary: nsDisplayListBuilder gets allocated on the heap sometimes → nsDisplayListBuilder should not be NS_STACK_CLASS
Assignee | ||
Comment 3•14 years ago
|
||
Remove NS_STACK_CLASS, remove throwing new, add trace-refcnt instrumentation to ensure we notice leaks.
Attachment #452489 -
Flags: review?(roc) → review+
Assignee | ||
Comment 4•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/30dc53f4f745
Assignee | ||
Updated•14 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Comment 5•14 years ago
|
||
Do we expect anyone to directly heap-allocate this? If no, should we keep the private operator new?
You need to log in
before you can comment on or make changes to this bug.
Description
•