Closed
Bug 403113
Opened 17 years ago
Closed 17 years ago
[FIX]nsCSSFrameConstructor::ProcessPendingRestyles() doesn't need to heap allocate restylesToProcess
Categories
(Core :: CSS Parsing and Computation, defect, P2)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla1.9beta2
People
(Reporter: pavlov, Assigned: bzbarsky)
Details
(Keywords: memory-footprint)
Attachments
(1 file, 1 obsolete file)
2.42 KB,
patch
|
roc
:
review+
roc
:
superreview+
roc
:
approval1.9+
|
Details | Diff | Splinter Review |
I'm seeing a lot of small allocations for restylesToProcess -- would be good to stack allocate them when possible. maybe use nsAutoTArray?
Assignee | ||
Comment 1•17 years ago
|
||
Using nsAutoTArray meant either just using it to allocate and nothing else (and messing about with *Elements()) or having it update count all the time, etc. Didn't seem worth it; this is simple enough.
Attachment #287937 -
Flags: superreview?(roc)
Attachment #287937 -
Flags: review?(roc)
Assignee | ||
Updated•17 years ago
|
OS: Windows XP → All
Priority: -- → P2
Hardware: PC → All
Summary: nsCSSFrameConstructor::ProcessPendingRestyles() doesn't need to heap allocate restylesToProcess → [FIX]nsCSSFrameConstructor::ProcessPendingRestyles() doesn't need to heap allocate restylesToProcess
Target Milestone: --- → mozilla1.9 M10
I think you should use nsAutoTArray. You can just call AppendElements() and use the returned pointer. It's less lines of code and safer because the destructor will get called if someone adds a new return path.
Assignee | ||
Comment 3•17 years ago
|
||
Attachment #287940 -
Flags: review?
Assignee | ||
Updated•17 years ago
|
Attachment #287937 -
Attachment is obsolete: true
Attachment #287937 -
Flags: superreview?(roc)
Attachment #287937 -
Flags: review?(roc)
Assignee | ||
Updated•17 years ago
|
Attachment #287940 -
Flags: superreview?(roc)
Attachment #287940 -
Flags: review?(roc)
Attachment #287940 -
Flags: review?
Attachment #287940 -
Flags: superreview?(roc)
Attachment #287940 -
Flags: superreview+
Attachment #287940 -
Flags: review?(roc)
Attachment #287940 -
Flags: review+
Attachment #287940 -
Flags: approval1.9+
Assignee | ||
Comment 4•17 years ago
|
||
Checked in.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•